From 971d2004f2b64f1e8fedf190064b4f1482be59c3 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Tue, 9 Apr 2013 12:56:29 +0200 Subject: [PATCH] Renaming Permission --> Perm and moving to main package. --- .../factions/{struct/Permission.java => Perm.java} | 7 +++---- src/com/massivecraft/factions/cmd/CmdAccess.java | 8 ++++---- src/com/massivecraft/factions/cmd/CmdAdmin.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdAutoClaim.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdCape.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdCapeGet.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdCapeRemove.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdCapeSet.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdClaim.java | 6 +++--- src/com/massivecraft/factions/cmd/CmdConfig.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdCreate.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdDeinvite.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdDemote.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdDescription.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdDisband.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdFlag.java | 6 +++--- src/com/massivecraft/factions/cmd/CmdHelp.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdHome.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdInvite.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdJoin.java | 8 ++++---- src/com/massivecraft/factions/cmd/CmdKick.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdLeader.java | 6 +++--- src/com/massivecraft/factions/cmd/CmdLeave.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdList.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdLock.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdMap.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdMoneyBalance.java | 6 +++--- src/com/massivecraft/factions/cmd/CmdMoneyDeposit.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdMoneyTransferFp.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdMoneyTransferPf.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdMoneyWithdraw.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdOfficer.java | 6 +++--- src/com/massivecraft/factions/cmd/CmdOpen.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdPerm.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdPower.java | 6 +++--- src/com/massivecraft/factions/cmd/CmdPowerBoost.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdPromote.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdReload.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdSaveAll.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdSeeChunk.java | 5 +++-- src/com/massivecraft/factions/cmd/CmdSethome.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdShow.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdTag.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdTitle.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdUnclaim.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdUnclaimall.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdVersion.java | 4 ++-- src/com/massivecraft/factions/cmd/FRelationCommand.java | 4 ++-- src/com/massivecraft/factions/struct/FPerm.java | 3 ++- 50 files changed, 112 insertions(+), 111 deletions(-) rename src/com/massivecraft/factions/{struct/Permission.java => Perm.java} (88%) diff --git a/src/com/massivecraft/factions/struct/Permission.java b/src/com/massivecraft/factions/Perm.java similarity index 88% rename from src/com/massivecraft/factions/struct/Permission.java rename to src/com/massivecraft/factions/Perm.java index 25a5c883..ca9970fa 100644 --- a/src/com/massivecraft/factions/struct/Permission.java +++ b/src/com/massivecraft/factions/Perm.java @@ -1,9 +1,8 @@ -package com.massivecraft.factions.struct; +package com.massivecraft.factions; import org.bukkit.command.CommandSender; -import com.massivecraft.factions.P; -public enum Permission +public enum Perm { ACCESS("access"), ACCESS_ANY("access.any"), @@ -67,7 +66,7 @@ public enum Permission public final String node; - Permission(final String node) + Perm(final String node) { this.node = "factions."+node; } diff --git a/src/com/massivecraft/factions/cmd/CmdAccess.java b/src/com/massivecraft/factions/cmd/CmdAccess.java index 551df73e..414229aa 100644 --- a/src/com/massivecraft/factions/cmd/CmdAccess.java +++ b/src/com/massivecraft/factions/cmd/CmdAccess.java @@ -4,9 +4,9 @@ import com.massivecraft.factions.Board; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.FPlayer; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.TerritoryAccess; import com.massivecraft.factions.zcore.util.TextUtil; @@ -40,11 +40,11 @@ public class CmdAccess extends FCommand TerritoryAccess territory = Board.getTerritoryAccessAt(loc); Faction locFaction = territory.getHostFaction(); - boolean accessAny = Permission.ACCESS_ANY.has(sender, false); + boolean accessAny = Perm.ACCESS_ANY.has(sender, false); if (type.isEmpty() || type.equals("view")) { - if ( ! accessAny && ! Permission.ACCESS_VIEW.has(sender, true)) return; + if ( ! accessAny && ! Perm.ACCESS_VIEW.has(sender, true)) return; if ( ! accessAny && ! territory.doesHostFactionMatch(fme)) { msg("This territory isn't controlled by your faction, so you can't view the access list."); @@ -54,7 +54,7 @@ public class CmdAccess extends FCommand return; } - if ( ! accessAny && ! Permission.ACCESS.has(sender, true)) return; + if ( ! accessAny && ! Perm.ACCESS.has(sender, true)) return; if ( ! accessAny && ! FPerm.ACCESS.has(fme, locFaction, true)) return; boolean doPlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdAdmin.java b/src/com/massivecraft/factions/cmd/CmdAdmin.java index d894ab6d..4f27b959 100644 --- a/src/com/massivecraft/factions/cmd/CmdAdmin.java +++ b/src/com/massivecraft/factions/cmd/CmdAdmin.java @@ -1,7 +1,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.P; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdAdmin extends FCommand { @@ -13,7 +13,7 @@ public class CmdAdmin extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("on/off", "flip"); - this.permission = Permission.ADMIN.node; + this.permission = Perm.ADMIN.node; this.disableOnLock = false; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdAutoClaim.java b/src/com/massivecraft/factions/cmd/CmdAutoClaim.java index 2e094cb6..faeafe83 100644 --- a/src/com/massivecraft/factions/cmd/CmdAutoClaim.java +++ b/src/com/massivecraft/factions/cmd/CmdAutoClaim.java @@ -1,8 +1,8 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; public class CmdAutoClaim extends FCommand { @@ -14,7 +14,7 @@ public class CmdAutoClaim extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("faction", "your"); - this.permission = Permission.AUTOCLAIM.node; + this.permission = Perm.AUTOCLAIM.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdCape.java b/src/com/massivecraft/factions/cmd/CmdCape.java index 2b8f7f10..a0c11c84 100644 --- a/src/com/massivecraft/factions/cmd/CmdCape.java +++ b/src/com/massivecraft/factions/cmd/CmdCape.java @@ -1,7 +1,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.P; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdCape extends FCommand { @@ -14,7 +14,7 @@ public class CmdCape extends FCommand super(); this.aliases.add("cape"); - this.permission = Permission.CAPE.node; + this.permission = Perm.CAPE.node; senderMustBePlayer = false; senderMustBeMember = false; diff --git a/src/com/massivecraft/factions/cmd/CmdCapeGet.java b/src/com/massivecraft/factions/cmd/CmdCapeGet.java index 35cd8653..f129c1a0 100644 --- a/src/com/massivecraft/factions/cmd/CmdCapeGet.java +++ b/src/com/massivecraft/factions/cmd/CmdCapeGet.java @@ -1,13 +1,13 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdCapeGet extends CapeCommand { public CmdCapeGet() { this.aliases.add("get"); - this.permission = Permission.CAPE_GET.node; + this.permission = Perm.CAPE_GET.node; } @Override diff --git a/src/com/massivecraft/factions/cmd/CmdCapeRemove.java b/src/com/massivecraft/factions/cmd/CmdCapeRemove.java index 71a65175..cfbf636e 100644 --- a/src/com/massivecraft/factions/cmd/CmdCapeRemove.java +++ b/src/com/massivecraft/factions/cmd/CmdCapeRemove.java @@ -1,7 +1,7 @@ package com.massivecraft.factions.cmd; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.integration.SpoutFeatures; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.util.RelationUtil; public class CmdCapeRemove extends CapeCommand @@ -14,7 +14,7 @@ public class CmdCapeRemove extends CapeCommand this.aliases.add("remove"); this.aliases.add("del"); this.aliases.add("delete"); - this.permission = Permission.CAPE_REMOVE.node; + this.permission = Perm.CAPE_REMOVE.node; } @Override diff --git a/src/com/massivecraft/factions/cmd/CmdCapeSet.java b/src/com/massivecraft/factions/cmd/CmdCapeSet.java index 3999cc70..18ef801a 100644 --- a/src/com/massivecraft/factions/cmd/CmdCapeSet.java +++ b/src/com/massivecraft/factions/cmd/CmdCapeSet.java @@ -2,8 +2,8 @@ package com.massivecraft.factions.cmd; import java.net.URL; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.integration.SpoutFeatures; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.util.RelationUtil; public class CmdCapeSet extends CapeCommand @@ -13,7 +13,7 @@ public class CmdCapeSet extends CapeCommand { this.aliases.add("set"); this.requiredArgs.add("url"); - this.permission = Permission.CAPE_SET.node; + this.permission = Perm.CAPE_SET.node; } @Override diff --git a/src/com/massivecraft/factions/cmd/CmdClaim.java b/src/com/massivecraft/factions/cmd/CmdClaim.java index 02dbc6ac..dde22447 100644 --- a/src/com/massivecraft/factions/cmd/CmdClaim.java +++ b/src/com/massivecraft/factions/cmd/CmdClaim.java @@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.Faction; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.util.SpiralTask; @@ -19,7 +19,7 @@ public class CmdClaim extends FCommand this.optionalArgs.put("faction", "your"); this.optionalArgs.put("radius", "1"); - this.permission = Permission.CLAIM.node; + this.permission = Perm.CLAIM.node; this.disableOnLock = true; senderMustBePlayer = true; @@ -49,7 +49,7 @@ public class CmdClaim extends FCommand else { // radius claim - if (! Permission.CLAIM_RADIUS.has(sender, false)) + if (! Perm.CLAIM_RADIUS.has(sender, false)) { msg("You do not have permission to claim in a radius."); return; diff --git a/src/com/massivecraft/factions/cmd/CmdConfig.java b/src/com/massivecraft/factions/cmd/CmdConfig.java index e42341f8..1aa092f5 100644 --- a/src/com/massivecraft/factions/cmd/CmdConfig.java +++ b/src/com/massivecraft/factions/cmd/CmdConfig.java @@ -14,10 +14,10 @@ import org.bukkit.entity.Player; import com.massivecraft.factions.Conf; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.struct.FFlag; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Rel; public class CmdConfig extends FCommand @@ -33,7 +33,7 @@ public class CmdConfig extends FCommand this.requiredArgs.add("value"); this.errorOnToManyArgs = false; - this.permission = Permission.CONFIG.node; + this.permission = Perm.CONFIG.node; this.disableOnLock = true; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdCreate.java b/src/com/massivecraft/factions/cmd/CmdCreate.java index 67cb2d11..8be58f08 100644 --- a/src/com/massivecraft/factions/cmd/CmdCreate.java +++ b/src/com/massivecraft/factions/cmd/CmdCreate.java @@ -10,9 +10,9 @@ import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Faction; import com.massivecraft.factions.Factions; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.event.FPlayerJoinEvent; import com.massivecraft.factions.event.FactionCreateEvent; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Rel; public class CmdCreate extends FCommand @@ -25,7 +25,7 @@ public class CmdCreate extends FCommand this.requiredArgs.add("faction tag"); //this.optionalArgs.put("", ""); - this.permission = Permission.CREATE.node; + this.permission = Perm.CREATE.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdDeinvite.java b/src/com/massivecraft/factions/cmd/CmdDeinvite.java index ce98edd2..a6279b75 100644 --- a/src/com/massivecraft/factions/cmd/CmdDeinvite.java +++ b/src/com/massivecraft/factions/cmd/CmdDeinvite.java @@ -1,7 +1,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.FPlayer; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdDeinvite extends FCommand { @@ -15,7 +15,7 @@ public class CmdDeinvite extends FCommand this.requiredArgs.add("player"); //this.optionalArgs.put("", ""); - this.permission = Permission.DEINVITE.node; + this.permission = Perm.DEINVITE.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdDemote.java b/src/com/massivecraft/factions/cmd/CmdDemote.java index 20fe1e3a..353954e4 100644 --- a/src/com/massivecraft/factions/cmd/CmdDemote.java +++ b/src/com/massivecraft/factions/cmd/CmdDemote.java @@ -1,7 +1,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.FPlayer; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.Rel; public class CmdDemote extends FCommand @@ -15,7 +15,7 @@ public class CmdDemote extends FCommand this.requiredArgs.add("player name"); //this.optionalArgs.put("", ""); - this.permission = Permission.DEMOTE.node; + this.permission = Perm.DEMOTE.node; this.disableOnLock = true; //To demote someone from member -> recruit you must be an officer. diff --git a/src/com/massivecraft/factions/cmd/CmdDescription.java b/src/com/massivecraft/factions/cmd/CmdDescription.java index a6a55548..38431a70 100644 --- a/src/com/massivecraft/factions/cmd/CmdDescription.java +++ b/src/com/massivecraft/factions/cmd/CmdDescription.java @@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayers; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.zcore.util.TextUtil; public class CmdDescription extends FCommand @@ -17,7 +17,7 @@ public class CmdDescription extends FCommand this.errorOnToManyArgs = false; //this.optionalArgs - this.permission = Permission.DESCRIPTION.node; + this.permission = Perm.DESCRIPTION.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdDisband.java b/src/com/massivecraft/factions/cmd/CmdDisband.java index 06f62de2..4b4023b0 100644 --- a/src/com/massivecraft/factions/cmd/CmdDisband.java +++ b/src/com/massivecraft/factions/cmd/CmdDisband.java @@ -10,10 +10,10 @@ import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Faction; import com.massivecraft.factions.P; import com.massivecraft.factions.FPlayer; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.struct.FFlag; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; public class CmdDisband extends FCommand { @@ -25,7 +25,7 @@ public class CmdDisband extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("faction", "your"); - this.permission = Permission.DISBAND.node; + this.permission = Perm.DISBAND.node; this.disableOnLock = true; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdFlag.java b/src/com/massivecraft/factions/cmd/CmdFlag.java index 33a65b91..b114982f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFlag.java +++ b/src/com/massivecraft/factions/cmd/CmdFlag.java @@ -1,8 +1,8 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.FFlag; -import com.massivecraft.factions.struct.Permission; public class CmdFlag extends FCommand { @@ -17,7 +17,7 @@ public class CmdFlag extends FCommand this.optionalArgs.put("flag", "all"); this.optionalArgs.put("yes/no", "read"); - this.permission = Permission.FLAG.node; + this.permission = Perm.FLAG.node; this.disableOnLock = true; senderMustBePlayer = false; @@ -59,7 +59,7 @@ public class CmdFlag extends FCommand if (targetValue == null) return; // Do the sender have the right to change flags? - if ( ! Permission.FLAG_SET.has(sender, true)) return; + if ( ! Perm.FLAG_SET.has(sender, true)) return; // Do the change msg(p.txt.titleize("Flag for " + faction.describeTo(fme, true))); diff --git a/src/com/massivecraft/factions/cmd/CmdHelp.java b/src/com/massivecraft/factions/cmd/CmdHelp.java index f55e3b2d..8dc53a8b 100644 --- a/src/com/massivecraft/factions/cmd/CmdHelp.java +++ b/src/com/massivecraft/factions/cmd/CmdHelp.java @@ -4,8 +4,8 @@ import java.util.ArrayList; import com.massivecraft.factions.Conf; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.integration.Econ; -import com.massivecraft.factions.struct.Permission; public class CmdHelp extends FCommand @@ -21,7 +21,7 @@ public class CmdHelp extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("page", "1"); - this.permission = Permission.HELP.node; + this.permission = Perm.HELP.node; this.disableOnLock = false; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdHome.java b/src/com/massivecraft/factions/cmd/CmdHome.java index 6a495f13..59e88ba1 100644 --- a/src/com/massivecraft/factions/cmd/CmdHome.java +++ b/src/com/massivecraft/factions/cmd/CmdHome.java @@ -13,9 +13,9 @@ import com.massivecraft.factions.FLocation; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.integration.EssentialsFeatures; import com.massivecraft.factions.struct.FFlag; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Rel; import com.massivecraft.factions.zcore.util.SmokeUtil; @@ -31,7 +31,7 @@ public class CmdHome extends FCommand //this.requiredArgs.add(""); //this.optionalArgs.put("", ""); - this.permission = Permission.HOME.node; + this.permission = Perm.HOME.node; this.disableOnLock = false; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdInvite.java b/src/com/massivecraft/factions/cmd/CmdInvite.java index a06dab3b..b7f8d873 100644 --- a/src/com/massivecraft/factions/cmd/CmdInvite.java +++ b/src/com/massivecraft/factions/cmd/CmdInvite.java @@ -2,8 +2,8 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; public class CmdInvite extends FCommand { @@ -16,7 +16,7 @@ public class CmdInvite extends FCommand this.requiredArgs.add("player"); //this.optionalArgs.put("", ""); - this.permission = Permission.INVITE.node; + this.permission = Perm.INVITE.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdJoin.java b/src/com/massivecraft/factions/cmd/CmdJoin.java index da41acd0..a30b67d3 100644 --- a/src/com/massivecraft/factions/cmd/CmdJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdJoin.java @@ -7,8 +7,8 @@ import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Faction; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.event.FPlayerJoinEvent; -import com.massivecraft.factions.struct.Permission; public class CmdJoin extends FCommand { @@ -20,7 +20,7 @@ public class CmdJoin extends FCommand this.requiredArgs.add("faction"); this.optionalArgs.put("player", "you"); - this.permission = Permission.JOIN.node; + this.permission = Perm.JOIN.node; this.disableOnLock = true; senderMustBePlayer = true; @@ -38,7 +38,7 @@ public class CmdJoin extends FCommand FPlayer fplayer = this.argAsBestFPlayerMatch(1, fme, false); boolean samePlayer = fplayer == fme; - if (!samePlayer && ! Permission.JOIN_OTHERS.has(sender, false)) + if (!samePlayer && ! Perm.JOIN_OTHERS.has(sender, false)) { msg("You do not have permission to move other players into a faction."); return; @@ -68,7 +68,7 @@ public class CmdJoin extends FCommand return; } - if( ! (faction.getOpen() || faction.isInvited(fplayer) || fme.hasAdminMode() || Permission.JOIN_ANY.has(sender, false))) + if( ! (faction.getOpen() || faction.isInvited(fplayer) || fme.hasAdminMode() || Perm.JOIN_ANY.has(sender, false))) { msg("This faction requires invitation."); if (samePlayer) diff --git a/src/com/massivecraft/factions/cmd/CmdKick.java b/src/com/massivecraft/factions/cmd/CmdKick.java index 8ad53a5d..651081a5 100644 --- a/src/com/massivecraft/factions/cmd/CmdKick.java +++ b/src/com/massivecraft/factions/cmd/CmdKick.java @@ -6,9 +6,9 @@ import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.event.FPlayerLeaveEvent; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Rel; public class CmdKick extends FCommand @@ -22,7 +22,7 @@ public class CmdKick extends FCommand this.requiredArgs.add("player"); //this.optionalArgs.put("", ""); - this.permission = Permission.KICK.node; + this.permission = Perm.KICK.node; this.disableOnLock = false; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdLeader.java b/src/com/massivecraft/factions/cmd/CmdLeader.java index fd1958ba..9ed94c35 100644 --- a/src/com/massivecraft/factions/cmd/CmdLeader.java +++ b/src/com/massivecraft/factions/cmd/CmdLeader.java @@ -5,8 +5,8 @@ import org.bukkit.Bukkit; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.event.FPlayerJoinEvent; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Rel; import com.massivecraft.factions.util.RelationUtil; @@ -20,7 +20,7 @@ public class CmdLeader extends FCommand this.requiredArgs.add("player"); this.optionalArgs.put("faction", "your"); - this.permission = Permission.LEADER.node; + this.permission = Perm.LEADER.node; this.disableOnLock = true; senderMustBePlayer = false; @@ -41,7 +41,7 @@ public class CmdLeader extends FCommand FPlayer targetFactionCurrentLeader = targetFaction.getFPlayerLeader(); // We now have fplayer and the target faction - if (this.senderIsConsole || fme.hasAdminMode() || Permission.LEADER_ANY.has(sender, false)) + if (this.senderIsConsole || fme.hasAdminMode() || Perm.LEADER_ANY.has(sender, false)) { // Do whatever you wish } diff --git a/src/com/massivecraft/factions/cmd/CmdLeave.java b/src/com/massivecraft/factions/cmd/CmdLeave.java index c2136ef6..51937f43 100644 --- a/src/com/massivecraft/factions/cmd/CmdLeave.java +++ b/src/com/massivecraft/factions/cmd/CmdLeave.java @@ -1,6 +1,6 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdLeave extends FCommand { @@ -12,7 +12,7 @@ public class CmdLeave extends FCommand { //this.requiredArgs.add(""); //this.optionalArgs.put("", ""); - this.permission = Permission.LEAVE.node; + this.permission = Perm.LEAVE.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdList.java b/src/com/massivecraft/factions/cmd/CmdList.java index 103c4a83..31bc021c 100644 --- a/src/com/massivecraft/factions/cmd/CmdList.java +++ b/src/com/massivecraft/factions/cmd/CmdList.java @@ -7,7 +7,7 @@ import java.util.Comparator; import com.massivecraft.factions.Conf; import com.massivecraft.factions.Faction; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdList extends FCommand @@ -22,7 +22,7 @@ public class CmdList extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("page", "1"); - this.permission = Permission.LIST.node; + this.permission = Perm.LIST.node; this.disableOnLock = false; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdLock.java b/src/com/massivecraft/factions/cmd/CmdLock.java index ff638df6..53db6fc8 100644 --- a/src/com/massivecraft/factions/cmd/CmdLock.java +++ b/src/com/massivecraft/factions/cmd/CmdLock.java @@ -1,6 +1,6 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdLock extends FCommand { @@ -19,7 +19,7 @@ public class CmdLock extends FCommand { //this.requiredArgs.add(""); this.optionalArgs.put("on/off", "flip"); - this.permission = Permission.LOCK.node; + this.permission = Perm.LOCK.node; this.disableOnLock = false; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdMap.java b/src/com/massivecraft/factions/cmd/CmdMap.java index 605a9d7d..965641c7 100644 --- a/src/com/massivecraft/factions/cmd/CmdMap.java +++ b/src/com/massivecraft/factions/cmd/CmdMap.java @@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Board; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FLocation; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdMap extends FCommand @@ -16,7 +16,7 @@ public class CmdMap extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("on/off", "once"); - this.permission = Permission.MAP.node; + this.permission = Perm.MAP.node; this.disableOnLock = false; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdMoneyBalance.java b/src/com/massivecraft/factions/cmd/CmdMoneyBalance.java index d95bf363..0dfbbaad 100644 --- a/src/com/massivecraft/factions/cmd/CmdMoneyBalance.java +++ b/src/com/massivecraft/factions/cmd/CmdMoneyBalance.java @@ -1,8 +1,8 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.integration.Econ; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; public class CmdMoneyBalance extends FCommand { @@ -15,7 +15,7 @@ public class CmdMoneyBalance extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("faction", "your"); - this.permission = Permission.MONEY_BALANCE.node; + this.permission = Perm.MONEY_BALANCE.node; this.setHelpShort("show faction balance"); senderMustBePlayer = false; @@ -34,7 +34,7 @@ public class CmdMoneyBalance extends FCommand } if (faction == null) return; - if (faction != myFaction && ! Permission.MONEY_BALANCE_ANY.has(sender, true)) return; + if (faction != myFaction && ! Perm.MONEY_BALANCE_ANY.has(sender, true)) return; Econ.sendBalanceInfo(fme, faction); } diff --git a/src/com/massivecraft/factions/cmd/CmdMoneyDeposit.java b/src/com/massivecraft/factions/cmd/CmdMoneyDeposit.java index fa8626c6..4c305593 100644 --- a/src/com/massivecraft/factions/cmd/CmdMoneyDeposit.java +++ b/src/com/massivecraft/factions/cmd/CmdMoneyDeposit.java @@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.iface.EconomyParticipator; import com.massivecraft.factions.integration.Econ; -import com.massivecraft.factions.struct.Permission; import org.bukkit.ChatColor; @@ -21,7 +21,7 @@ public class CmdMoneyDeposit extends FCommand this.requiredArgs.add("amount"); this.optionalArgs.put("faction", "your"); - this.permission = Permission.MONEY_DEPOSIT.node; + this.permission = Perm.MONEY_DEPOSIT.node; this.setHelpShort("deposit money"); senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java b/src/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java index 209f9052..439a5a94 100644 --- a/src/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java +++ b/src/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java @@ -1,10 +1,10 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.iface.EconomyParticipator; import com.massivecraft.factions.P; import com.massivecraft.factions.integration.Econ; -import com.massivecraft.factions.struct.Permission; import org.bukkit.ChatColor; @@ -21,7 +21,7 @@ public class CmdMoneyTransferFf extends FCommand //this.optionalArgs.put("", ""); - this.permission = Permission.MONEY_F2F.node; + this.permission = Perm.MONEY_F2F.node; this.setHelpShort("transfer f -> f"); senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdMoneyTransferFp.java b/src/com/massivecraft/factions/cmd/CmdMoneyTransferFp.java index 9b30a752..78404748 100644 --- a/src/com/massivecraft/factions/cmd/CmdMoneyTransferFp.java +++ b/src/com/massivecraft/factions/cmd/CmdMoneyTransferFp.java @@ -1,10 +1,10 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.iface.EconomyParticipator; import com.massivecraft.factions.P; import com.massivecraft.factions.integration.Econ; -import com.massivecraft.factions.struct.Permission; import org.bukkit.ChatColor; @@ -21,7 +21,7 @@ public class CmdMoneyTransferFp extends FCommand //this.optionalArgs.put("", ""); - this.permission = Permission.MONEY_F2P.node; + this.permission = Perm.MONEY_F2P.node; this.setHelpShort("transfer f -> p"); senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdMoneyTransferPf.java b/src/com/massivecraft/factions/cmd/CmdMoneyTransferPf.java index fadb6fd1..8cffce91 100644 --- a/src/com/massivecraft/factions/cmd/CmdMoneyTransferPf.java +++ b/src/com/massivecraft/factions/cmd/CmdMoneyTransferPf.java @@ -1,10 +1,10 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.iface.EconomyParticipator; import com.massivecraft.factions.P; import com.massivecraft.factions.integration.Econ; -import com.massivecraft.factions.struct.Permission; import org.bukkit.ChatColor; @@ -21,7 +21,7 @@ public class CmdMoneyTransferPf extends FCommand //this.optionalArgs.put("", ""); - this.permission = Permission.MONEY_P2F.node; + this.permission = Perm.MONEY_P2F.node; this.setHelpShort("transfer p -> f"); senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdMoneyWithdraw.java b/src/com/massivecraft/factions/cmd/CmdMoneyWithdraw.java index 6c1b094c..d7393af5 100644 --- a/src/com/massivecraft/factions/cmd/CmdMoneyWithdraw.java +++ b/src/com/massivecraft/factions/cmd/CmdMoneyWithdraw.java @@ -1,10 +1,10 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.iface.EconomyParticipator; import com.massivecraft.factions.P; import com.massivecraft.factions.integration.Econ; -import com.massivecraft.factions.struct.Permission; import org.bukkit.ChatColor; @@ -19,7 +19,7 @@ public class CmdMoneyWithdraw extends FCommand this.requiredArgs.add("amount"); this.optionalArgs.put("faction", "your"); - this.permission = Permission.MONEY_WITHDRAW.node; + this.permission = Perm.MONEY_WITHDRAW.node; this.setHelpShort("withdraw money"); senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdOfficer.java b/src/com/massivecraft/factions/cmd/CmdOfficer.java index ee67efbf..7c798266 100644 --- a/src/com/massivecraft/factions/cmd/CmdOfficer.java +++ b/src/com/massivecraft/factions/cmd/CmdOfficer.java @@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FPlayer; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.Rel; public class CmdOfficer extends FCommand @@ -16,7 +16,7 @@ public class CmdOfficer extends FCommand this.requiredArgs.add("player name"); //this.optionalArgs.put("", ""); - this.permission = Permission.OFFICER.node; + this.permission = Perm.OFFICER.node; this.disableOnLock = true; senderMustBePlayer = false; @@ -31,7 +31,7 @@ public class CmdOfficer extends FCommand FPlayer you = this.argAsBestFPlayerMatch(0); if (you == null) return; - boolean permAny = Permission.OFFICER_ANY.has(sender, false); + boolean permAny = Perm.OFFICER_ANY.has(sender, false); Faction targetFaction = you.getFaction(); if (targetFaction != myFaction && !permAny) diff --git a/src/com/massivecraft/factions/cmd/CmdOpen.java b/src/com/massivecraft/factions/cmd/CmdOpen.java index 0f95a872..db05345b 100644 --- a/src/com/massivecraft/factions/cmd/CmdOpen.java +++ b/src/com/massivecraft/factions/cmd/CmdOpen.java @@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; import com.massivecraft.factions.Faction; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdOpen extends FCommand { @@ -15,7 +15,7 @@ public class CmdOpen extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("yes/no", "flip"); - this.permission = Permission.OPEN.node; + this.permission = Perm.OPEN.node; this.disableOnLock = false; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdPerm.java b/src/com/massivecraft/factions/cmd/CmdPerm.java index 387a247f..162641fa 100644 --- a/src/com/massivecraft/factions/cmd/CmdPerm.java +++ b/src/com/massivecraft/factions/cmd/CmdPerm.java @@ -1,8 +1,8 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Rel; public class CmdPerm extends FCommand @@ -18,7 +18,7 @@ public class CmdPerm extends FCommand this.optionalArgs.put("relation", "read"); this.optionalArgs.put("yes/no", "read"); - this.permission = Permission.PERM.node; + this.permission = Perm.PERM.node; this.disableOnLock = true; this.errorOnToManyArgs = false; diff --git a/src/com/massivecraft/factions/cmd/CmdPower.java b/src/com/massivecraft/factions/cmd/CmdPower.java index 4f1e6d4c..c9b96913 100644 --- a/src/com/massivecraft/factions/cmd/CmdPower.java +++ b/src/com/massivecraft/factions/cmd/CmdPower.java @@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdPower extends FCommand { @@ -16,7 +16,7 @@ public class CmdPower extends FCommand //this.requiredArgs.add("faction tag"); this.optionalArgs.put("player", "you"); - this.permission = Permission.POWER.node; + this.permission = Perm.POWER.node; this.disableOnLock = false; senderMustBePlayer = false; @@ -31,7 +31,7 @@ public class CmdPower extends FCommand FPlayer target = this.argAsBestFPlayerMatch(0, fme); if (target == null) return; - if (target != fme && ! Permission.POWER_ANY.has(sender, true)) return; + if (target != fme && ! Perm.POWER_ANY.has(sender, true)) return; // if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay if ( ! payForCommand(Conf.econCostPower, "to show player power info", "for showing player power info")) return; diff --git a/src/com/massivecraft/factions/cmd/CmdPowerBoost.java b/src/com/massivecraft/factions/cmd/CmdPowerBoost.java index 9a849662..59e37534 100644 --- a/src/com/massivecraft/factions/cmd/CmdPowerBoost.java +++ b/src/com/massivecraft/factions/cmd/CmdPowerBoost.java @@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.P; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdPowerBoost extends FCommand { @@ -16,7 +16,7 @@ public class CmdPowerBoost extends FCommand this.requiredArgs.add("name"); this.requiredArgs.add("#"); - this.permission = Permission.POWERBOOST.node; + this.permission = Perm.POWERBOOST.node; this.disableOnLock = true; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdPromote.java b/src/com/massivecraft/factions/cmd/CmdPromote.java index d18d3bf4..36a39e08 100644 --- a/src/com/massivecraft/factions/cmd/CmdPromote.java +++ b/src/com/massivecraft/factions/cmd/CmdPromote.java @@ -1,7 +1,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.FPlayer; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.Rel; public class CmdPromote extends FCommand @@ -15,7 +15,7 @@ public class CmdPromote extends FCommand this.requiredArgs.add("player name"); //this.optionalArgs.put("", ""); - this.permission = Permission.PROMOTE.node; + this.permission = Perm.PROMOTE.node; this.disableOnLock = true; //To promote someone from recruit -> member you must be an officer. diff --git a/src/com/massivecraft/factions/cmd/CmdReload.java b/src/com/massivecraft/factions/cmd/CmdReload.java index b3c2cddf..06bdcf0f 100644 --- a/src/com/massivecraft/factions/cmd/CmdReload.java +++ b/src/com/massivecraft/factions/cmd/CmdReload.java @@ -5,7 +5,7 @@ import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Factions; import com.massivecraft.factions.P; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdReload extends FCommand { @@ -18,7 +18,7 @@ public class CmdReload extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("file", "all"); - this.permission = Permission.RELOAD.node; + this.permission = Perm.RELOAD.node; this.disableOnLock = false; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdSaveAll.java b/src/com/massivecraft/factions/cmd/CmdSaveAll.java index 407c5b50..31b744f6 100644 --- a/src/com/massivecraft/factions/cmd/CmdSaveAll.java +++ b/src/com/massivecraft/factions/cmd/CmdSaveAll.java @@ -4,7 +4,7 @@ import com.massivecraft.factions.Board; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdSaveAll extends FCommand { @@ -18,7 +18,7 @@ public class CmdSaveAll extends FCommand //this.requiredArgs.add(""); //this.optionalArgs.put("", ""); - this.permission = Permission.SAVE.node; + this.permission = Perm.SAVE.node; this.disableOnLock = false; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/CmdSeeChunk.java b/src/com/massivecraft/factions/cmd/CmdSeeChunk.java index 5763fbc0..c7f60600 100644 --- a/src/com/massivecraft/factions/cmd/CmdSeeChunk.java +++ b/src/com/massivecraft/factions/cmd/CmdSeeChunk.java @@ -4,7 +4,8 @@ import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.entity.Player; -import com.massivecraft.factions.struct.Permission; + +import com.massivecraft.factions.Perm; import com.massivecraft.factions.util.VisualizeUtil; public class CmdSeeChunk extends FCommand @@ -15,7 +16,7 @@ public class CmdSeeChunk extends FCommand this.aliases.add("sc"); this.aliases.add("seechunk"); - this.permission = Permission.SEE_CHUNK.node; + this.permission = Perm.SEE_CHUNK.node; this.disableOnLock = false; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdSethome.java b/src/com/massivecraft/factions/cmd/CmdSethome.java index 03e8d63b..923456b9 100644 --- a/src/com/massivecraft/factions/cmd/CmdSethome.java +++ b/src/com/massivecraft/factions/cmd/CmdSethome.java @@ -4,8 +4,8 @@ import com.massivecraft.factions.Board; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; public class CmdSethome extends FCommand { @@ -16,7 +16,7 @@ public class CmdSethome extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("faction", "your"); - this.permission = Permission.SETHOME.node; + this.permission = Perm.SETHOME.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdShow.java b/src/com/massivecraft/factions/cmd/CmdShow.java index 412fd78a..f2631a02 100644 --- a/src/com/massivecraft/factions/cmd/CmdShow.java +++ b/src/com/massivecraft/factions/cmd/CmdShow.java @@ -9,8 +9,8 @@ import com.massivecraft.factions.Conf; import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.FFlag; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Rel; import com.massivecraft.factions.zcore.util.TextUtil; @@ -24,7 +24,7 @@ public class CmdShow extends FCommand //this.requiredArgs.add(""); this.optionalArgs.put("faction", "your"); - this.permission = Permission.SHOW.node; + this.permission = Perm.SHOW.node; this.disableOnLock = false; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdTag.java b/src/com/massivecraft/factions/cmd/CmdTag.java index a5015b59..809b5933 100644 --- a/src/com/massivecraft/factions/cmd/CmdTag.java +++ b/src/com/massivecraft/factions/cmd/CmdTag.java @@ -7,9 +7,9 @@ import org.bukkit.Bukkit; import com.massivecraft.factions.Conf; import com.massivecraft.factions.Faction; import com.massivecraft.factions.Factions; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.event.FactionRenameEvent; import com.massivecraft.factions.integration.SpoutFeatures; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.util.MiscUtil; public class CmdTag extends FCommand @@ -22,7 +22,7 @@ public class CmdTag extends FCommand this.requiredArgs.add("new tag"); //this.optionalArgs.put("", ""); - this.permission = Permission.TAG.node; + this.permission = Perm.TAG.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdTitle.java b/src/com/massivecraft/factions/cmd/CmdTitle.java index ba014ad5..c3962c6d 100644 --- a/src/com/massivecraft/factions/cmd/CmdTitle.java +++ b/src/com/massivecraft/factions/cmd/CmdTitle.java @@ -2,8 +2,8 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.integration.SpoutFeatures; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.zcore.util.TextUtil; public class CmdTitle extends FCommand @@ -15,7 +15,7 @@ public class CmdTitle extends FCommand this.requiredArgs.add("player"); this.optionalArgs.put("title", ""); - this.permission = Permission.TITLE.node; + this.permission = Perm.TITLE.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdUnclaim.java b/src/com/massivecraft/factions/cmd/CmdUnclaim.java index 109d02da..8f838e3e 100644 --- a/src/com/massivecraft/factions/cmd/CmdUnclaim.java +++ b/src/com/massivecraft/factions/cmd/CmdUnclaim.java @@ -10,8 +10,8 @@ import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.Faction; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.struct.FPerm; -import com.massivecraft.factions.struct.Permission; public class CmdUnclaim extends FCommand { @@ -23,7 +23,7 @@ public class CmdUnclaim extends FCommand //this.requiredArgs.add(""); //this.optionalArgs.put("", ""); - this.permission = Permission.UNCLAIM.node; + this.permission = Perm.UNCLAIM.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdUnclaimall.java b/src/com/massivecraft/factions/cmd/CmdUnclaimall.java index 0c7049a3..22eac7ad 100644 --- a/src/com/massivecraft/factions/cmd/CmdUnclaimall.java +++ b/src/com/massivecraft/factions/cmd/CmdUnclaimall.java @@ -5,10 +5,10 @@ import org.bukkit.Bukkit; import com.massivecraft.factions.Board; import com.massivecraft.factions.Conf; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.event.LandUnclaimAllEvent; import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.integration.SpoutFeatures; -import com.massivecraft.factions.struct.Permission; public class CmdUnclaimall extends FCommand { @@ -20,7 +20,7 @@ public class CmdUnclaimall extends FCommand //this.requiredArgs.add(""); //this.optionalArgs.put("", ""); - this.permission = Permission.UNCLAIM_ALL.node; + this.permission = Perm.UNCLAIM_ALL.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/cmd/CmdVersion.java b/src/com/massivecraft/factions/cmd/CmdVersion.java index e9bfae94..7dc193e1 100644 --- a/src/com/massivecraft/factions/cmd/CmdVersion.java +++ b/src/com/massivecraft/factions/cmd/CmdVersion.java @@ -1,7 +1,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.P; -import com.massivecraft.factions.struct.Permission; +import com.massivecraft.factions.Perm; public class CmdVersion extends FCommand @@ -13,7 +13,7 @@ public class CmdVersion extends FCommand //this.requiredArgs.add(""); //this.optionalArgs.put("", ""); - this.permission = Permission.VERSION.node; + this.permission = Perm.VERSION.node; this.disableOnLock = false; senderMustBePlayer = false; diff --git a/src/com/massivecraft/factions/cmd/FRelationCommand.java b/src/com/massivecraft/factions/cmd/FRelationCommand.java index 099a497b..c85d2069 100644 --- a/src/com/massivecraft/factions/cmd/FRelationCommand.java +++ b/src/com/massivecraft/factions/cmd/FRelationCommand.java @@ -4,10 +4,10 @@ import org.bukkit.Bukkit; import com.massivecraft.factions.Conf; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.event.FactionRelationEvent; import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.struct.FFlag; -import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Rel; public abstract class FRelationCommand extends FCommand @@ -20,7 +20,7 @@ public abstract class FRelationCommand extends FCommand this.requiredArgs.add("faction"); //this.optionalArgs.put("", ""); - this.permission = Permission.RELATION.node; + this.permission = Perm.RELATION.node; this.disableOnLock = true; senderMustBePlayer = true; diff --git a/src/com/massivecraft/factions/struct/FPerm.java b/src/com/massivecraft/factions/struct/FPerm.java index 7ee0daad..e816f4eb 100644 --- a/src/com/massivecraft/factions/struct/FPerm.java +++ b/src/com/massivecraft/factions/struct/FPerm.java @@ -16,6 +16,7 @@ import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.Faction; import com.massivecraft.factions.P; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.iface.RelationParticipator; /** @@ -167,7 +168,7 @@ public enum FPerm { FPlayer fplayer = (FPlayer)rpSubject; fplayer.msg(errorpattern, hostFaction.describeTo(fplayer, true), this.getDescription()); - if (Permission.ADMIN.has(fplayer.getPlayer())) + if (Perm.ADMIN.has(fplayer.getPlayer())) { fplayer.msg("You can bypass by using " + P.p.cmdBase.cmdBypass.getUseageTemplate(false)); }