Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
samolego committed Aug 17, 2021
1 parent 3539442 commit 08a40e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
minecraft_version=1.17
yarn_mappings=1.17+build.1
loader_version=0.11.3
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.39
loader_version=0.11.6

#Fabric api
fabric_version=0.34.9+1.17
fabric_version=0.37.2+1.17

# Mod Properties
mod_version = 1.0.7
mod_version = 1.0.8
maven_group = org.samo_lego
archives_base_name = healthcare
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ public class HealthcareCommand {

public static void register(CommandDispatcher<ServerCommandSource> dispatcher, boolean dedicated) {
dispatcher.register(literal("healthcare")
.requires(src -> src.hasPermissionLevel(4) || LUCKPERMS_LOADED)
.requires(src -> LUCKPERMS_LOADED ? PermissionHelper.checkPermission(src, config.perms.healthcare_reloadConfig, 4) : src.hasPermissionLevel(4))
.then(literal("reloadConfig").executes(HealthcareCommand::reloadConfig))
);
}

private static int reloadConfig(CommandContext<ServerCommandSource> ctx) {
if(LUCKPERMS_LOADED && !PermissionHelper.checkPermission(ctx.getSource(), config.perms.healthcare_reloadConfig, 4)) {
ctx.getSource().sendError(new LiteralText(config.lang.noPermission).formatted(Formatting.RED));
return -1;
}

config = HealthConfig.loadConfigFile(new File(FabricLoader.getInstance().getConfigDir() + "/config.json"));

ctx.getSource().sendFeedback(
Expand Down

0 comments on commit 08a40e0

Please sign in to comment.