From 39f1bd740477da8ef144a05407af62bd3af67d78 Mon Sep 17 00:00:00 2001 From: Trent Hensler Date: Thu, 4 Jan 2018 23:01:52 -0800 Subject: [PATCH] Fix permissions --- .../java/com/massivecraft/factions/cmd/CmdModifyPower.java | 2 +- src/main/java/com/massivecraft/factions/cmd/CmdPerm.java | 2 +- .../java/com/massivecraft/factions/cmd/CmdPermanentPower.java | 2 +- src/main/java/com/massivecraft/factions/cmd/CmdReload.java | 3 --- .../java/com/massivecraft/factions/cmd/FPromoteCommand.java | 2 +- src/main/java/com/massivecraft/factions/struct/Permission.java | 2 ++ 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdModifyPower.java b/src/main/java/com/massivecraft/factions/cmd/CmdModifyPower.java index 7c5f75d5..f593d90e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdModifyPower.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdModifyPower.java @@ -4,7 +4,7 @@ import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.zcore.util.TL; -public class CmdModifyPower extends FCommand { +public class CmdModifyPower extends FCommand { public CmdModifyPower() { super(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPerm.java b/src/main/java/com/massivecraft/factions/cmd/CmdPerm.java index aef64468..dba70d75 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPerm.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPerm.java @@ -20,7 +20,7 @@ public class CmdPerm extends FCommand { this.optionalArgs.put("action", "action"); this.optionalArgs.put("access", "access"); - this.permission = Permission.SET_PEACEFUL.node; + this.permission = Permission.PERMISSIONS.node; this.disableOnLock = false; senderMustBePlayer = true; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java b/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java index acc7a35c..a6aa65bb 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java @@ -11,7 +11,7 @@ public class CmdPermanentPower extends FCommand { this.aliases.add("permanentpower"); this.requiredArgs.add("faction"); - this.optionalArgs.put("power", "reset"); + this.requiredArgs.add("power"); this.permission = Permission.SET_PERMANENTPOWER.node; this.disableOnLock = true; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdReload.java b/src/main/java/com/massivecraft/factions/cmd/CmdReload.java index 333bb6d8..a3febb82 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdReload.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdReload.java @@ -11,9 +11,6 @@ public class CmdReload extends FCommand { super(); this.aliases.add("reload"); - //this.requiredArgs.add(""); - this.optionalArgs.put("file", "all"); - this.permission = Permission.RELOAD.node; this.disableOnLock = false; diff --git a/src/main/java/com/massivecraft/factions/cmd/FPromoteCommand.java b/src/main/java/com/massivecraft/factions/cmd/FPromoteCommand.java index 00e45a61..c0c06358 100644 --- a/src/main/java/com/massivecraft/factions/cmd/FPromoteCommand.java +++ b/src/main/java/com/massivecraft/factions/cmd/FPromoteCommand.java @@ -16,7 +16,7 @@ public class FPromoteCommand extends FCommand { this.requiredArgs.add("player"); - this.permission = Permission.MOD.node; + this.permission = Permission.PROMOTE.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/main/java/com/massivecraft/factions/struct/Permission.java b/src/main/java/com/massivecraft/factions/struct/Permission.java index 913818c6..8642de5e 100644 --- a/src/main/java/com/massivecraft/factions/struct/Permission.java +++ b/src/main/java/com/massivecraft/factions/struct/Permission.java @@ -58,9 +58,11 @@ public enum Permission { SET_PERMANENT("setpermanent"), SET_PERMANENTPOWER("setpermanentpower"), SHOW_INVITES("showinvites"), + PERMISSIONS("permissions"), POWERBOOST("powerboost"), POWER("power"), POWER_ANY("power.any"), + PROMOTE("promote"), RELATION("relation"), RELOAD("reload"), SAVE("save"),