From 799d931050b4935946ebdf17c39b3a33bc53f1d4 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Thu, 26 May 2016 10:17:44 +0200 Subject: [PATCH] MassiveCore - Permission System Improvements --- src/com/massivecraft/factions/Perm.java | 10 ++++++---- src/com/massivecraft/factions/cmd/CmdFactions.java | 3 ++- .../massivecraft/factions/cmd/CmdFactionsAccess.java | 2 +- .../factions/cmd/CmdFactionsAccessFaction.java | 2 +- .../factions/cmd/CmdFactionsAccessPlayer.java | 2 +- .../factions/cmd/CmdFactionsAccessView.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsClaim.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsCreate.java | 2 +- .../factions/cmd/CmdFactionsDescription.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsDisband.java | 2 +- .../factions/cmd/CmdFactionsExpansions.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsFaction.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsFlag.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsFlagList.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsFlagSet.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsFlagShow.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsHome.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsInvite.java | 2 +- .../factions/cmd/CmdFactionsInviteAdd.java | 2 +- .../factions/cmd/CmdFactionsInviteList.java | 2 +- .../factions/cmd/CmdFactionsInviteRemove.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsJoin.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsKick.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsLeave.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsList.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsMap.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsMoney.java | 2 +- .../factions/cmd/CmdFactionsMoneyBalance.java | 2 +- .../factions/cmd/CmdFactionsMoneyDeposit.java | 2 +- .../factions/cmd/CmdFactionsMoneyTransferFf.java | 2 +- .../factions/cmd/CmdFactionsMoneyTransferFp.java | 2 +- .../factions/cmd/CmdFactionsMoneyTransferPf.java | 2 +- .../factions/cmd/CmdFactionsMoneyWithdraw.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsMotd.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsName.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsOverride.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsPerm.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsPermList.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsPermSet.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsPermShow.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsPlayer.java | 2 +- .../factions/cmd/CmdFactionsPowerBoost.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsRank.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsRelation.java | 2 +- .../factions/cmd/CmdFactionsRelationList.java | 2 +- .../factions/cmd/CmdFactionsRelationSet.java | 2 +- .../factions/cmd/CmdFactionsRelationWishes.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsSeeChunk.java | 2 +- .../factions/cmd/CmdFactionsSeeChunkOld.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsSetAll.java | 4 ++-- .../massivecraft/factions/cmd/CmdFactionsSetAuto.java | 4 ++-- .../factions/cmd/CmdFactionsSetCircle.java | 4 ++-- .../massivecraft/factions/cmd/CmdFactionsSetFill.java | 4 ++-- .../massivecraft/factions/cmd/CmdFactionsSetOne.java | 4 ++-- .../factions/cmd/CmdFactionsSetSquare.java | 4 ++-- .../massivecraft/factions/cmd/CmdFactionsSethome.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsSetpower.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsStatus.java | 2 +- .../factions/cmd/CmdFactionsTerritorytitles.java | 3 +-- .../massivecraft/factions/cmd/CmdFactionsTitle.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsUnclaim.java | 2 +- .../factions/cmd/CmdFactionsUnsethome.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsUnstuck.java | 2 +- 63 files changed, 75 insertions(+), 73 deletions(-) diff --git a/src/com/massivecraft/factions/Perm.java b/src/com/massivecraft/factions/Perm.java index a5f84d79..45c8795a 100644 --- a/src/com/massivecraft/factions/Perm.java +++ b/src/com/massivecraft/factions/Perm.java @@ -2,9 +2,10 @@ package com.massivecraft.factions; import org.bukkit.permissions.Permissible; +import com.massivecraft.massivecore.Identified; import com.massivecraft.massivecore.util.PermissionUtil; -public enum Perm +public enum Perm implements Identified { // -------------------------------------------- // // ENUM @@ -93,7 +94,8 @@ public enum Perm // FIELDS // -------------------------------------------- // - public final String node; + private final String id; + @Override public String getId() { return this.id; } // -------------------------------------------- // // CONSTRUCT @@ -101,7 +103,7 @@ public enum Perm Perm() { - this.node = "factions." + this.name().toLowerCase().replace('_', '.'); + this.id = PermissionUtil.createPermissionId(Factions.get(), this); } // -------------------------------------------- // @@ -110,7 +112,7 @@ public enum Perm public boolean has(Permissible permissible, boolean informSenderIfNot) { - return PermissionUtil.hasPermission(permissible, this.node, informSenderIfNot); + return PermissionUtil.hasPermission(permissible, this.id, informSenderIfNot); } public boolean has(Permissible permissible) diff --git a/src/com/massivecraft/factions/cmd/CmdFactions.java b/src/com/massivecraft/factions/cmd/CmdFactions.java index 5a46ab5c..dc32d88e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactions.java @@ -7,6 +7,7 @@ import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.MConf; import com.massivecraft.massivecore.command.MassiveCommandDeprecated; import com.massivecraft.massivecore.command.MassiveCommandVersion; +import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; public class CmdFactions extends FactionsCommand { @@ -67,7 +68,7 @@ public class CmdFactions extends FactionsCommand public CmdFactionsDisband cmdFactionsDisband = new CmdFactionsDisband(); public CmdFactionsPowerBoost cmdFactionsPowerBoost = new CmdFactionsPowerBoost(); public CmdFactionsSetpower cmdFactionsSetpower = new CmdFactionsSetpower(); - public MassiveCommandVersion cmdFactionsVersion = new MassiveCommandVersion(Factions.get(), Perm.VERSION.node, "v", "version"); + public MassiveCommandVersion cmdFactionsVersion = new MassiveCommandVersion(Factions.get()).setAliases("v", "version").addRequirements(RequirementHasPerm.get(Perm.VERSION)); // -------------------------------------------- // // CONSTRUCT diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java index 3ed7eaf2..c606f14d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java @@ -31,7 +31,7 @@ public class CmdFactionsAccess extends FactionsCommand // Requirements this.addRequirements(RequirementIsPlayer.get()); - this.addRequirements(RequirementHasPerm.get(Perm.ACCESS.node)); + this.addRequirements(RequirementHasPerm.get(Perm.ACCESS)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java index 628a70b8..2e79a449 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java @@ -25,7 +25,7 @@ public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract this.addParameter(TypeBoolean.getYes(), "yes/no", "toggle"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_FACTION.node)); + this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_FACTION)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java index 487d0c3a..5ab88501 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java @@ -25,7 +25,7 @@ public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract this.addParameter(TypeBoolean.getYes(), "yes/no", "toggle"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_PLAYER.node)); + this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_PLAYER)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java index 8ff41146..32506226 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java @@ -15,7 +15,7 @@ public class CmdFactionsAccessView extends CmdFactionsAccessAbstract this.addAliases("view"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_VIEW.node)); + this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_VIEW)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java index 6a1c39e2..c78b024e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java @@ -35,7 +35,7 @@ public class CmdFactionsClaim extends FactionsCommand this.addChild(this.cmdFactionsClaimAll); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.CLAIM.node)); + this.addRequirements(RequirementHasPerm.get(Perm.CLAIM)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java index 93656547..d20b1406 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java @@ -36,7 +36,7 @@ public class CmdFactionsCreate extends FactionsCommand // Requirements this.addRequirements(ReqHasntFaction.get()); - this.addRequirements(RequirementHasPerm.get(Perm.CREATE.node)); + this.addRequirements(RequirementHasPerm.get(Perm.CREATE)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java b/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java index 2eaefda9..9c0a3c26 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java @@ -25,7 +25,7 @@ public class CmdFactionsDescription extends FactionsCommand this.addParameter(TypeString.get(), "desc", true); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.DESCRIPTION.node)); + this.addRequirements(RequirementHasPerm.get(Perm.DESCRIPTION)); this.addRequirements(ReqHasFaction.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java b/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java index a4a9488b..8b4200e8 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java @@ -32,7 +32,7 @@ public class CmdFactionsDisband extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.DISBAND.node)); + this.addRequirements(RequirementHasPerm.get(Perm.DISBAND)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java b/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java index 1083e3df..bb963bba 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java @@ -19,7 +19,7 @@ public class CmdFactionsExpansions extends FactionsCommand this.addAliases("expansions"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.EXPANSIONS.node)); + this.addRequirements(RequirementHasPerm.get(Perm.EXPANSIONS)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java b/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java index 559080f3..3176d383 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java @@ -31,7 +31,7 @@ public class CmdFactionsFaction extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FACTION.node)); + this.addRequirements(RequirementHasPerm.get(Perm.FACTION)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java index fed06d20..f6e740a5 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java @@ -28,7 +28,7 @@ public class CmdFactionsFlag extends FactionsCommand this.addChild(this.cmdFactionsFlagSet); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FLAG.node)); + this.addRequirements(RequirementHasPerm.get(Perm.FLAG)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java index 0b9e5971..9491d1f1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java @@ -25,7 +25,7 @@ public class CmdFactionsFlagList extends FactionsCommand this.addParameter(Parameter.getPage()); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FLAG_LIST.node)); + this.addRequirements(RequirementHasPerm.get(Perm.FLAG_LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java index 3561ea49..f3335dd3 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java @@ -28,7 +28,7 @@ public class CmdFactionsFlagSet extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FLAG_SET.node)); + this.addRequirements(RequirementHasPerm.get(Perm.FLAG_SET)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java index 9b941bdb..8bbf7557 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java @@ -30,7 +30,7 @@ public class CmdFactionsFlagShow extends FactionsCommand this.addParameter(TypeSet.get(TypeMFlag.get()), "flags", "all", true); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FLAG_SHOW.node)); + this.addRequirements(RequirementHasPerm.get(Perm.FLAG_SHOW)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java index fd6ea52f..4a05c3c6 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java @@ -40,7 +40,7 @@ public class CmdFactionsHome extends FactionsCommandHome this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.HOME.node)); + this.addRequirements(RequirementHasPerm.get(Perm.HOME)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java b/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java index bfaa75b2..2cecf3ff 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java @@ -29,7 +29,7 @@ public class CmdFactionsInvite extends FactionsCommand // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.INVITE.node)); + this.addRequirements(RequirementHasPerm.get(Perm.INVITE)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java index d3807eb2..4c897749 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java @@ -29,7 +29,7 @@ public class CmdFactionsInviteAdd extends FactionsCommand this.addParameter(TypeSet.get(TypeMPlayer.get()), "players", true); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.INVITE_ADD.node)); + this.addRequirements(RequirementHasPerm.get(Perm.INVITE_ADD)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java index a96a268c..feba4fd2 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java @@ -31,7 +31,7 @@ public class CmdFactionsInviteList extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.INVITE_LIST.node)); + this.addRequirements(RequirementHasPerm.get(Perm.INVITE_LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java index 73997812..4e6424b7 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java @@ -32,7 +32,7 @@ public class CmdFactionsInviteRemove extends FactionsCommand this.addParameter(TypeSet.get(TypeMPlayer.get()), "players/all", true); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.INVITE_REMOVE.node)); + this.addRequirements(RequirementHasPerm.get(Perm.INVITE_REMOVE)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java index aee9dbc6..a8ea4fac 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java @@ -33,7 +33,7 @@ public class CmdFactionsJoin extends FactionsCommand this.addParameter(TypeMPlayer.get(), "player", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.JOIN.node)); + this.addRequirements(RequirementHasPerm.get(Perm.JOIN)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java index 1ccbeb4f..55daa27c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java @@ -32,7 +32,7 @@ public class CmdFactionsKick extends FactionsCommand this.addParameter(TypeMPlayer.get(), "player"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.KICK.node)); + this.addRequirements(RequirementHasPerm.get(Perm.KICK)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java b/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java index 005f19ff..e8b27a4e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java @@ -16,7 +16,7 @@ public class CmdFactionsLeave extends FactionsCommand this.addAliases("leave"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.LEAVE.node)); + this.addRequirements(RequirementHasPerm.get(Perm.LEAVE)); this.addRequirements(ReqHasFaction.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsList.java b/src/com/massivecraft/factions/cmd/CmdFactionsList.java index d9895adc..c5ed9c05 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsList.java @@ -36,7 +36,7 @@ public class CmdFactionsList extends FactionsCommand this.addParameter(Parameter.getPage()); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.LIST.node)); + this.addRequirements(RequirementHasPerm.get(Perm.LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java index 0070fa54..a849b54d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java @@ -28,7 +28,7 @@ public class CmdFactionsMap extends FactionsCommand this.addParameter(TypeBoolean.getOn(), "on/off", "once"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MAP.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MAP)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java index 32d14855..d6c002b8 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java @@ -36,7 +36,7 @@ public class CmdFactionsMoney extends FactionsCommand // Requirements this.addRequirements(ReqBankCommandsEnabled.get()); - this.addRequirements(RequirementHasPerm.get(Perm.MONEY.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MONEY)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java index 8ad153c7..ebd29948 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java @@ -23,7 +23,7 @@ public class CmdFactionsMoneyBalance extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_BALANCE.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MONEY_BALANCE)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java index b2b46562..456524fc 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java @@ -31,7 +31,7 @@ public class CmdFactionsMoneyDeposit extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_DEPOSIT.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MONEY_DEPOSIT)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java index e7a14225..3e2e87d5 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java @@ -33,7 +33,7 @@ public class CmdFactionsMoneyTransferFf extends FactionsCommand this.addParameter(TypeFaction.get(), "faction"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_F2F.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MONEY_F2F)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java index 2d034f37..f1e431da 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java @@ -35,7 +35,7 @@ public class CmdFactionsMoneyTransferFp extends FactionsCommand this.addParameter(TypeMPlayer.get(), "player"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_F2P.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MONEY_F2P)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java index 12b9409f..03e43fe9 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java @@ -35,7 +35,7 @@ public class CmdFactionsMoneyTransferPf extends FactionsCommand this.addParameter(TypeFaction.get(), "faction"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_P2F.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MONEY_P2F)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java index 4bb1b45f..564efbd1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java @@ -33,7 +33,7 @@ public class CmdFactionsMoneyWithdraw extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_WITHDRAW.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MONEY_WITHDRAW)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java b/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java index 3453941b..79a2791d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java @@ -27,7 +27,7 @@ public class CmdFactionsMotd extends FactionsCommand this.addParameter(TypeString.get(), "new", "read", true); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MOTD.node)); + this.addRequirements(RequirementHasPerm.get(Perm.MOTD)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsName.java b/src/com/massivecraft/factions/cmd/CmdFactionsName.java index 269fc561..c16411e8 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsName.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsName.java @@ -29,7 +29,7 @@ public class CmdFactionsName extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.NAME.node)); + this.addRequirements(RequirementHasPerm.get(Perm.NAME)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsOverride.java b/src/com/massivecraft/factions/cmd/CmdFactionsOverride.java index 0ba94556..5b4f575d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsOverride.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsOverride.java @@ -23,7 +23,7 @@ public class CmdFactionsOverride extends FactionsCommand this.addParameter(TypeBoolean.getOn(), "on/off", "flip"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.OVERRIDE.node)); + this.addRequirements(RequirementHasPerm.get(Perm.OVERRIDE)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java b/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java index c83db406..5fd2f928 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java @@ -28,7 +28,7 @@ public class CmdFactionsPerm extends FactionsCommand this.addChild(this.cmdFactionsPermSet); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PERM.node)); + this.addRequirements(RequirementHasPerm.get(Perm.PERM)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java index d565316d..ee9e2355 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java @@ -25,7 +25,7 @@ public class CmdFactionsPermList extends FactionsCommand this.addParameter(Parameter.getPage()); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PERM_LIST.node)); + this.addRequirements(RequirementHasPerm.get(Perm.PERM_LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java index 1eac5e78..357b440e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java @@ -35,7 +35,7 @@ public class CmdFactionsPermSet extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PERM_SET.node)); + this.addRequirements(RequirementHasPerm.get(Perm.PERM_SET)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java index d0d629f5..c09cbcac 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java @@ -30,7 +30,7 @@ public class CmdFactionsPermShow extends FactionsCommand this.addParameter(TypeSet.get(TypeMPerm.get()), "perms", "all", true); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PERM_SHOW.node)); + this.addRequirements(RequirementHasPerm.get(Perm.PERM_SHOW)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java b/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java index f03af921..247d8841 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java @@ -30,7 +30,7 @@ public class CmdFactionsPlayer extends FactionsCommand this.addParameter(TypeMPlayer.get(), "player", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PLAYER.node)); + this.addRequirements(RequirementHasPerm.get(Perm.PLAYER)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java b/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java index cc9b89b6..ea93656a 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java @@ -36,7 +36,7 @@ public class CmdFactionsPowerBoost extends FactionsCommand this.addParameter(TypeDouble.get(), "#"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.POWERBOOST.node)); + this.addRequirements(RequirementHasPerm.get(Perm.POWERBOOST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRank.java b/src/com/massivecraft/factions/cmd/CmdFactionsRank.java index c157797c..ebe2cf0b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRank.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRank.java @@ -63,7 +63,7 @@ public class CmdFactionsRank extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "their"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RANK.node)); + this.addRequirements(RequirementHasPerm.get(Perm.RANK)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java index fb0e66e1..26e07468 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java @@ -29,7 +29,7 @@ public class CmdFactionsRelation extends FactionsCommand this.addAliases("relation"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RELATION.node)); + this.addRequirements(RequirementHasPerm.get(Perm.RELATION)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationList.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationList.java index ca8ba7ef..5ab7ce6b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationList.java @@ -48,7 +48,7 @@ public class CmdFactionsRelationList extends FactionsCommand this.addParameter(TypeSet.get(TypeRelation.get()), "relations", "all"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RELATION_LIST.node)); + this.addRequirements(RequirementHasPerm.get(Perm.RELATION_LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java index 3f66d4e2..aa36d829 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java @@ -32,7 +32,7 @@ public class CmdFactionsRelationSet extends FactionsCommand this.addParameter(TypeRelation.get(), "relation"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RELATION_SET.node)); + this.addRequirements(RequirementHasPerm.get(Perm.RELATION_SET)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java index b22c6665..dadf7d50 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java @@ -37,7 +37,7 @@ public class CmdFactionsRelationWishes extends FactionsCommand this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RELATION_WISHES.node)); + this.addRequirements(RequirementHasPerm.get(Perm.RELATION_WISHES)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java index e60ffcf5..c0c30fe9 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java @@ -22,7 +22,7 @@ public class CmdFactionsSeeChunk extends FactionsCommand this.addParameter(TypeBoolean.getOn(), "active", "toggle"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.SEECHUNK.node)); + this.addRequirements(RequirementHasPerm.get(Perm.SEECHUNK)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java index da9593a5..ac4502cf 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java @@ -24,7 +24,7 @@ public class CmdFactionsSeeChunkOld extends FactionsCommand this.addAliases("sco", "seechunkold"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.SEECHUNKOLD.node)); + this.addRequirements(RequirementHasPerm.get(Perm.SEECHUNKOLD)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetAll.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetAll.java index 37ed3924..1e602431 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetAll.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetAll.java @@ -37,8 +37,8 @@ public class CmdFactionsSetAll extends CmdFactionsSetXAll this.addAliases("all"); // Requirements - String node = claim ? Perm.CLAIM_ALL.node : Perm.UNCLAIM_ALL.node; - this.addRequirements(RequirementHasPerm.get(node)); + Perm perm = claim ? Perm.CLAIM_ALL : Perm.UNCLAIM_ALL; + this.addRequirements(RequirementHasPerm.get(perm)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java index ff1c38fb..6656a018 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java @@ -44,8 +44,8 @@ public class CmdFactionsSetAuto extends FactionsCommand // Requirements this.addRequirements(RequirementIsPlayer.get()); - String node = claim ? Perm.CLAIM_AUTO.node : Perm.UNCLAIM_AUTO.node; - this.addRequirements(RequirementHasPerm.get(node)); + Perm perm = claim ? Perm.CLAIM_AUTO : Perm.UNCLAIM_AUTO; + this.addRequirements(RequirementHasPerm.get(perm)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetCircle.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetCircle.java index b33d1d9f..52c641da 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetCircle.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetCircle.java @@ -30,8 +30,8 @@ public class CmdFactionsSetCircle extends CmdFactionsSetXRadius // Requirements this.addRequirements(RequirementIsPlayer.get()); - String node = claim ? Perm.CLAIM_CIRCLE.node : Perm.UNCLAIM_CIRCLE.node; - this.addRequirements(RequirementHasPerm.get(node)); + Perm perm = claim ? Perm.CLAIM_CIRCLE : Perm.UNCLAIM_CIRCLE; + this.addRequirements(RequirementHasPerm.get(perm)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetFill.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetFill.java index 234b4a82..79af97ff 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetFill.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetFill.java @@ -33,8 +33,8 @@ public class CmdFactionsSetFill extends CmdFactionsSetXSimple // Requirements this.addRequirements(RequirementIsPlayer.get()); - String node = claim ? Perm.CLAIM_FILL.node : Perm.UNCLAIM_FILL.node; - this.addRequirements(RequirementHasPerm.get(node)); + Perm perm = claim ? Perm.CLAIM_FILL : Perm.UNCLAIM_FILL; + this.addRequirements(RequirementHasPerm.get(perm)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetOne.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetOne.java index ab9d2a6c..81645ae6 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetOne.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetOne.java @@ -25,8 +25,8 @@ public class CmdFactionsSetOne extends CmdFactionsSetXSimple // Requirements this.addRequirements(RequirementIsPlayer.get()); - String node = claim ? Perm.CLAIM_ONE.node : Perm.UNCLAIM_ONE.node; - this.addRequirements(RequirementHasPerm.get(node)); + Perm perm = claim ? Perm.CLAIM_ONE : Perm.UNCLAIM_ONE; + this.addRequirements(RequirementHasPerm.get(perm)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetSquare.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetSquare.java index c70a377a..f368fefe 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetSquare.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetSquare.java @@ -30,8 +30,8 @@ public class CmdFactionsSetSquare extends CmdFactionsSetXRadius // Requirements this.addRequirements(RequirementIsPlayer.get()); - String node = claim ? Perm.CLAIM_SQUARE.node : Perm.UNCLAIM_SQUARE.node; - this.addRequirements(RequirementHasPerm.get(node)); + Perm perm = claim ? Perm.CLAIM_SQUARE : Perm.UNCLAIM_SQUARE; + this.addRequirements(RequirementHasPerm.get(perm)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java b/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java index 2648b592..7f24c8de 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java @@ -25,7 +25,7 @@ public class CmdFactionsSethome extends FactionsCommandHome this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.SETHOME.node)); + this.addRequirements(RequirementHasPerm.get(Perm.SETHOME)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java index 8cde9226..134d1ebf 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetpower.java @@ -25,7 +25,7 @@ public class CmdFactionsSetpower extends FactionsCommand this.addParameter(TypeDouble.get(), "power"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.SETPOWER.node)); + this.addRequirements(RequirementHasPerm.get(Perm.SETPOWER)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java b/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java index 960a37fe..3184c303 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java @@ -39,7 +39,7 @@ public class CmdFactionsStatus extends FactionsCommand this.addParameter(TypeSortMPlayer.get(), "sort", "time"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.STATUS.node)); + this.addRequirements(RequirementHasPerm.get(Perm.STATUS)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java b/src/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java index c57cc225..fb2533a1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java @@ -7,7 +7,6 @@ import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementTitlesAvailable; import com.massivecraft.massivecore.command.type.primitive.TypeBoolean; import com.massivecraft.massivecore.mixin.MixinTitle; -import com.massivecraft.massivecore.nms.NmsChat; import com.massivecraft.massivecore.util.Txt; public class CmdFactionsTerritorytitles extends FactionsCommand @@ -25,7 +24,7 @@ public class CmdFactionsTerritorytitles extends FactionsCommand this.addParameter(TypeBoolean.getOn(), "on|off", "toggle"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.TERRITORYTITLES.node)); + this.addRequirements(RequirementHasPerm.get(Perm.TERRITORYTITLES)); this.addRequirements(RequirementTitlesAvailable.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java b/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java index 91908a7c..8a94a3f1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java @@ -28,7 +28,7 @@ public class CmdFactionsTitle extends FactionsCommand this.addParameter(TypeString.get(), "title", "", true); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.TITLE.node)); + this.addRequirements(RequirementHasPerm.get(Perm.TITLE)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java index 4d1e7f54..5c6f0cb4 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java @@ -35,7 +35,7 @@ public class CmdFactionsUnclaim extends FactionsCommand this.addChild(this.cmdFactionsUnclaimAll); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.UNCLAIM.node)); + this.addRequirements(RequirementHasPerm.get(Perm.UNCLAIM)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java index 9beb9a9d..6c85a2c9 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java @@ -23,7 +23,7 @@ public class CmdFactionsUnsethome extends FactionsCommandHome this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.UNSETHOME.node)); + this.addRequirements(RequirementHasPerm.get(Perm.UNSETHOME)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java index 661efae1..5594aa3a 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java @@ -34,7 +34,7 @@ public class CmdFactionsUnstuck extends FactionsCommand this.addAliases("unstuck"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.UNSTUCK.node)); + this.addRequirements(RequirementHasPerm.get(Perm.UNSTUCK)); this.addRequirements(RequirementIsPlayer.get()); }