From b8ccab40bb8d0a433a4c0309309c8ae40cc79ef1 Mon Sep 17 00:00:00 2001 From: Flemmli97 Date: Wed, 6 Apr 2022 13:13:13 +0200 Subject: [PATCH] fix #148 some commands using wrong permission nodes --- Changelog.md | 4 ++++ .../io/github/flemmli97/flan/commands/CommandClaim.java | 8 ++++---- gradle.properties | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Changelog.md b/Changelog.md index f7b3ee3..be8fdfd 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,7 @@ +Flan 1.7.6 +================ +- Fix delete command using wrong permission node + Flan 1.7.5 ================ - Fix a typo in the default lang file diff --git a/common/src/main/java/io/github/flemmli97/flan/commands/CommandClaim.java b/common/src/main/java/io/github/flemmli97/flan/commands/CommandClaim.java index c20cba4..1dbaa51 100644 --- a/common/src/main/java/io/github/flemmli97/flan/commands/CommandClaim.java +++ b/common/src/main/java/io/github/flemmli97/flan/commands/CommandClaim.java @@ -67,10 +67,10 @@ public class CommandClaim { .then(Commands.literal("claimInfo").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdInfo)).executes(ctx -> CommandClaim.claimInfo(ctx, Claim.InfoType.ALL)) .then(Commands.argument("type", StringArgumentType.word()).suggests((src, b) -> CommandHelpers.enumSuggestion(Claim.InfoType.class, b)).executes(CommandClaim::claimInfo))) .then(Commands.literal("transferClaim").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdTransfer)).then(Commands.argument("player", GameProfileArgument.gameProfile()).executes(CommandClaim::transferClaim))) - .then(Commands.literal("delete").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdTransfer)).executes(CommandClaim::deleteClaim)) - .then(Commands.literal("deleteAll").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdTransfer)).executes(CommandClaim::deleteAllClaim)) - .then(Commands.literal("deleteSubClaim").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdTransfer)).executes(CommandClaim::deleteSubClaim)) - .then(Commands.literal("deleteAllSubClaims").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdTransfer)).executes(CommandClaim::deleteAllSubClaim)) + .then(Commands.literal("delete").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdDelete)).executes(CommandClaim::deleteClaim)) + .then(Commands.literal("deleteAll").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdDeleteAll)).executes(CommandClaim::deleteAllClaim)) + .then(Commands.literal("deleteSubClaim").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdDeleteSub)).executes(CommandClaim::deleteSubClaim)) + .then(Commands.literal("deleteAllSubClaims").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdDeleteSubAll)).executes(CommandClaim::deleteAllSubClaim)) .then(Commands.literal("list").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdList)).executes(CommandClaim::listClaims).then(Commands.argument("player", GameProfileArgument.gameProfile()).requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdListAll, true)) .executes(cmd -> listClaims(cmd, GameProfileArgument.getGameProfiles(cmd, "player"))))) .then(Commands.literal("switchMode").requires(src -> PermissionNodeHandler.INSTANCE.perm(src, PermissionNodeHandler.cmdClaimMode)).executes(CommandClaim::switchClaimMode)) diff --git a/gradle.properties b/gradle.properties index f63fa95..3a7f0d3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ forge_version=1.18.2-40.0.3 loader_version=0.13.2 # Mod Properties -mod_version=1.7.5 +mod_version=1.7.6 maven_group=io.github.flemmli97 archives_base_name=flan