fix #148 some commands using wrong permission nodes

This commit is contained in:
Flemmli97 2022-04-06 13:13:13 +02:00
parent 90f1cdf069
commit b8ccab40bb
3 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -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))

View File

@ -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