From d6ec4ad5f0a368a6209d946e237fd31487b48e1a Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Fri, 8 Feb 2019 16:52:14 +0100 Subject: [PATCH] Remove unneccessary perms in Perm.java --- src/com/massivecraft/factions/Perm.java | 101 ++---------------- .../factions/cmd/CmdFactions.java | 2 +- .../factions/cmd/CmdFactionsMoney.java | 6 +- ....java => CmdFactionsMoneyTransferF2f.java} | 7 +- ....java => CmdFactionsMoneyTransferF2p.java} | 7 +- ....java => CmdFactionsMoneyTransferP2f.java} | 7 +- 6 files changed, 19 insertions(+), 111 deletions(-) rename src/com/massivecraft/factions/cmd/{CmdFactionsMoneyTransferFf.java => CmdFactionsMoneyTransferF2f.java} (86%) rename src/com/massivecraft/factions/cmd/{CmdFactionsMoneyTransferFp.java => CmdFactionsMoneyTransferF2p.java} (87%) rename src/com/massivecraft/factions/cmd/{CmdFactionsMoneyTransferPf.java => CmdFactionsMoneyTransferP2f.java} (87%) diff --git a/src/com/massivecraft/factions/Perm.java b/src/com/massivecraft/factions/Perm.java index 8b0b91a4..17988c80 100644 --- a/src/com/massivecraft/factions/Perm.java +++ b/src/com/massivecraft/factions/Perm.java @@ -9,111 +9,28 @@ public enum Perm implements Identified // -------------------------------------------- // // ENUM // -------------------------------------------- // - - ACCESS, - ACCESS_VIEW, - ACCESS_PLAYER, - ACCESS_FACTION, - OVERRIDE, - BASECOMMAND, - CLAIM, + CLAIM_ONE, CLAIM_AUTO, CLAIM_FILL, CLAIM_SQUARE, CLAIM_CIRCLE, CLAIM_ALL, - CREATE, - DESCRIPTION, - DISBAND, - DOCUMENTATION, - DOCUMENTATION_FLAGS, - DOCUMENTATION_PERMS, - DOCUMENTATION_POWER, - DOCUMENTATION_RANKS, - DOCUMENTATION_WARPS, - EXPANSIONS, - FACTION, - FLAG, - FLAG_LIST, - FLAG_SET, - FLAG_SHOW, - FLY, - FLY_OTHER, - HOME, - INVITE, - INVITE_LIST, - INVITE_LIST_OTHER, - INVITE_ADD, - INVITE_REMOVE, - JOIN, - JOIN_OTHERS, - KICK, - LEAVE, - LIST, - MAP, - MONEY, - MONEY_BALANCE, - MONEY_BALANCE_ANY, - MONEY_DEPOSIT, - MONEY_F2F, - MONEY_F2P, - MONEY_P2F, - MONEY_WITHDRAW, - MONEYCONVERT, - MOTD, - OPEN, - PERM, - PERM_LIST, - PERM_SET, - PERM_SHOW, - PERM_VIEW, - PERM_VIEWALL, - PLAYER, - POWERBOOST, - POWERBOOST_PLAYER, - POWERBOOST_FACTION, - POWERBOOST_SET, - RANK, - RANK_SHOW, - RANK_SET, - RANK_LIST, - RANK_EDIT, - RANK_EDIT_CREATE, - RANK_EDIT_NAME, - RANK_EDIT_PREFIX, - RANK_EDIT_PRIORITY, - RANK_EDIT_DELETE, - RELATION, - RELATION_SET, - RELATION_LIST, - RELATION_WISHES, - SEECHUNK, - SEECHUNKOLD, - SETHOME, - SETPOWER, - STATUS, - NAME, - TITLE, - TITLE_COLOR, - TERRITORYTITLES, - TOP, - UNCLAIM, UNCLAIM_ONE, UNCLAIM_AUTO, UNCLAIM_FILL, UNCLAIM_SQUARE, UNCLAIM_CIRCLE, UNCLAIM_ALL, - UNSETHOME, - UNSTUCK, - WARP, - WARP_GO, - WARP_LIST, - WARP_ADD, - WARP_REMOVE, + OVERRIDE, + FLY, + JOIN_OTHERS, + INVITE_LIST_OTHER, + TITLE_COLOR, + POWERBOOST_SET, + MONEY_BALANCE_ANY, + SETPOWER, CONFIG, - CLEAN, VERSION, // END OF LIST diff --git a/src/com/massivecraft/factions/cmd/CmdFactions.java b/src/com/massivecraft/factions/cmd/CmdFactions.java index 4ca30ec5..cd033a54 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactions.java @@ -63,7 +63,7 @@ public class CmdFactions extends FactionsCommand public CmdFactionsMoneyconvert cmdFactionsMoneyconvert = new CmdFactionsMoneyconvert(); public CmdFactionsConfig cmdFactionsConfig = new CmdFactionsConfig(); public CmdFactionsClean cmdFactionsClean = new CmdFactionsClean(); - public MassiveCommandVersion cmdFactionsVersion = new MassiveCommandVersion(Factions.get()).setAliases("v", "version").addRequirements(RequirementHasPerm.get(Perm.VERSION)); + public MassiveCommandVersion cmdFactionsVersion = new MassiveCommandVersion(Factions.get()).addRequirements(RequirementHasPerm.get(Perm.VERSION)); // -------------------------------------------- // // CONSTRUCT diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java index 1cc75228..aeb48fa4 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java @@ -11,9 +11,9 @@ public class CmdFactionsMoney extends FactionsCommand public CmdFactionsMoneyBalance cmdMoneyBalance = new CmdFactionsMoneyBalance(); public CmdFactionsMoneyDeposit cmdMoneyDeposit = new CmdFactionsMoneyDeposit(); public CmdFactionsMoneyWithdraw cmdMoneyWithdraw = new CmdFactionsMoneyWithdraw(); - public CmdFactionsMoneyTransferFf cmdMoneyTransferFf = new CmdFactionsMoneyTransferFf(); - public CmdFactionsMoneyTransferFp cmdMoneyTransferFp = new CmdFactionsMoneyTransferFp(); - public CmdFactionsMoneyTransferPf cmdMoneyTransferPf = new CmdFactionsMoneyTransferPf(); + public CmdFactionsMoneyTransferF2f cmdMoneyTransferFf = new CmdFactionsMoneyTransferF2f(); + public CmdFactionsMoneyTransferF2p cmdMoneyTransferFp = new CmdFactionsMoneyTransferF2p(); + public CmdFactionsMoneyTransferP2f cmdMoneyTransferPf = new CmdFactionsMoneyTransferP2f(); // -------------------------------------------- // // CONSTRUCT diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2f.java similarity index 86% rename from src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java rename to src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2f.java index eae43e25..f890f9d0 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2f.java @@ -1,26 +1,24 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; -public class CmdFactionsMoneyTransferFf extends FactionsCommand +public class CmdFactionsMoneyTransferF2f extends FactionsCommand { // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // - public CmdFactionsMoneyTransferFf() + public CmdFactionsMoneyTransferF2f() { // Fields this.setSetupEnabled(false); @@ -34,7 +32,6 @@ public class CmdFactionsMoneyTransferFf extends FactionsCommand this.addParameter(TypeFaction.get(), "faction").setDesc("the faction to transfer money to"); // Requirements - 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/CmdFactionsMoneyTransferF2p.java similarity index 87% rename from src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java rename to src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2p.java index 9a04bc79..85484617 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferF2p.java @@ -1,7 +1,6 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMPlayer; @@ -10,19 +9,18 @@ import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; -public class CmdFactionsMoneyTransferFp extends FactionsCommand +public class CmdFactionsMoneyTransferF2p extends FactionsCommand { // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // - public CmdFactionsMoneyTransferFp() + public CmdFactionsMoneyTransferF2p() { // Fields this.setSetupEnabled(false); @@ -36,7 +34,6 @@ public class CmdFactionsMoneyTransferFp extends FactionsCommand this.addParameter(TypeMPlayer.get(), "player").setDesc("the player to transfer money to"); // Requirements - 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/CmdFactionsMoneyTransferP2f.java similarity index 87% rename from src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java rename to src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferP2f.java index accf024b..383cc8d1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferP2f.java @@ -1,7 +1,6 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMPlayer; @@ -10,19 +9,18 @@ import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.Txt; import org.bukkit.ChatColor; -public class CmdFactionsMoneyTransferPf extends FactionsCommand +public class CmdFactionsMoneyTransferP2f extends FactionsCommand { // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // - public CmdFactionsMoneyTransferPf() + public CmdFactionsMoneyTransferP2f() { // Fields this.setSetupEnabled(false); @@ -36,7 +34,6 @@ public class CmdFactionsMoneyTransferPf extends FactionsCommand this.addParameter(TypeFaction.get(), "faction").setDesc("the faction to transfer money to"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_P2F)); this.addRequirements(ReqBankCommandsEnabled.get()); }