Getting back on course...

This commit is contained in:
DroppingAnvil 2019-09-15 03:23:10 -05:00
parent 8e238e2b48
commit 6f5ba4c11b
2 changed files with 135 additions and 134 deletions

View File

@ -57,6 +57,7 @@ import java.util.stream.Collectors;
public class FactionsPlugin extends MPlugin { public class FactionsPlugin extends MPlugin {
// Our single plugin instance. // Our single plugin instance.
// Single 4 life. // Single 4 life.
public static FactionsPlugin instance; public static FactionsPlugin instance;

View File

@ -4,142 +4,142 @@ import com.massivecraft.factions.FactionsPlugin;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
public enum Permission { public enum Permission {
MANAGE_SAFE_ZONE("managesafezone"), MANAGE_SAFE_ZONE("managesafezone"),
MANAGE_WAR_ZONE("managewarzone"), MANAGE_WAR_ZONE("managewarzone"),
OWNERSHIP_BYPASS("ownershipbypass"), OWNERSHIP_BYPASS("ownershipbypass"),
ADMIN("admin"), ADMIN("admin"),
ALTS("alts"), ALTS("alts"),
ADMIN_ANY("admin.any"), ADMIN_ANY("admin.any"),
AHOME("ahome"), AHOME("ahome"),
ANNOUNCE("announce"), ANNOUNCE("announce"),
AUTOCLAIM("autoclaim"), AUTOCLAIM("autoclaim"),
AUTO_LEAVE_BYPASS("autoleavebypass"), AUTO_LEAVE_BYPASS("autoleavebypass"),
BAN("ban"), BAN("ban"),
BYPASS("bypass"), BYPASS("bypass"),
CHAT("chat"), CHAT("chat"),
CHATSPY("chatspy"), CHATSPY("chatspy"),
CHECK("check"), CHECK("check"),
CLAIM("claim"), CLAIM("claim"),
CLAIMAT("claimat"), CLAIMAT("claimat"),
CLAIM_LINE("claim.line"), CLAIM_LINE("claim.line"),
CLAIM_RADIUS("claim.radius"), CLAIM_RADIUS("claim.radius"),
CONFIG("config"), CONFIG("config"),
CONVERT("convert"), CONVERT("convert"),
CONVERTCONFIG("convertconfig"), CONVERTCONFIG("convertconfig"),
CREATE("create"), CREATE("create"),
CORNER("corner"), CORNER("corner"),
DEFAULTRANK("defaultrank"), DEFAULTRANK("defaultrank"),
DEINVITE("deinvite"), DEINVITE("deinvite"),
DELHOME("delhome"), DELHOME("delhome"),
DESCRIPTION("description"), DESCRIPTION("description"),
DISBAND("disband"), DISBAND("disband"),
DISBAND_ANY("disband.any"), DISBAND_ANY("disband.any"),
FLY("fly"), FLY("fly"),
FOCUS("focus"), FOCUS("focus"),
GLOBALCHAT("globalchat"), GLOBALCHAT("globalchat"),
GRACE("grace"), GRACE("grace"),
HELP("help"), HELP("help"),
HOME("home"), HOME("home"),
INVITE("invite"), INVITE("invite"),
INVSEE("invsee"), INVSEE("invsee"),
JOIN("join"), JOIN("join"),
JOIN_ANY("join.any"), JOIN_ANY("join.any"),
JOIN_OTHERS("join.others"), JOIN_OTHERS("join.others"),
KICK("kick"), KICK("kick"),
KICK_ANY("kick.any"), KICK_ANY("kick.any"),
LEAVE("leave"), LEAVE("leave"),
LIST("list"), LIST("list"),
LOCK("lock"), LOCK("lock"),
LOGOUT("logout"), LOGOUT("logout"),
MAP("map"), MAP("map"),
MAPHEIGHT("mapheight"), MAPHEIGHT("mapheight"),
MOD("mod"), MOD("mod"),
COLEADER("coleader"), COLEADER("coleader"),
MOD_ANY("mod.any"), MOD_ANY("mod.any"),
COLEADER_ANY("coleader.any"), COLEADER_ANY("coleader.any"),
MISSIONS("missions"), MISSIONS("missions"),
MODIFY_POWER("modifypower"), MODIFY_POWER("modifypower"),
MONEY_BALANCE("money.balance"), MONEY_BALANCE("money.balance"),
MONEY_BALANCE_ANY("money.balance.any"), MONEY_BALANCE_ANY("money.balance.any"),
MONEY_DEPOSIT("money.deposit"), MONEY_DEPOSIT("money.deposit"),
MONEY_WITHDRAW("money.withdraw"), MONEY_WITHDRAW("money.withdraw"),
MONEY_WITHDRAW_ANY("money.withdraw.any"), MONEY_WITHDRAW_ANY("money.withdraw.any"),
MONEY_F2F("money.f2f"), MONEY_F2F("money.f2f"),
MONEY_F2P("money.f2p"), MONEY_F2P("money.f2p"),
MONEY_P2F("money.p2f"), MONEY_P2F("money.p2f"),
MONITOR_LOGINS("monitorlogins"), MONITOR_LOGINS("monitorlogins"),
NEAR("near"), NEAR("near"),
NO_BOOM("noboom"), NO_BOOM("noboom"),
OPEN("open"), OPEN("open"),
OWNER("owner"), OWNER("owner"),
OWNERLIST("ownerlist"), OWNERLIST("ownerlist"),
SET_PEACEFUL("setpeaceful"), SET_PEACEFUL("setpeaceful"),
SET_PERMANENT("setpermanent"), SET_PERMANENT("setpermanent"),
SET_PERMANENTPOWER("setpermanentpower"), SET_PERMANENTPOWER("setpermanentpower"),
SHOW_INVITES("showinvites"), SHOW_INVITES("showinvites"),
PAYPAL("paypal"), PAYPAL("paypal"),
PAYPALSET("setpaypal"), PAYPALSET("setpaypal"),
PERMISSIONS("permissions"), PERMISSIONS("permissions"),
POINTS("points"), POINTS("points"),
POWERBOOST("powerboost"), POWERBOOST("powerboost"),
POWER("power"), POWER("power"),
POWER_ANY("power.any"), POWER_ANY("power.any"),
PROMOTE("promote"), PROMOTE("promote"),
RELATION("relation"), RELATION("relation"),
RELOAD("reload"), RELOAD("reload"),
SAVE("save"), SAVE("save"),
SPAM("spam"), SPAM("spam"),
SETHOME("sethome"), SETHOME("sethome"),
SETHOME_ANY("sethome.any"), SETHOME_ANY("sethome.any"),
SETSTRIKES("setstrikes"), SETSTRIKES("setstrikes"),
SHOW("show"), SHOW("show"),
STATUS("status"), STATUS("status"),
STEALTH("stealth"), STEALTH("stealth"),
STUCK("stuck"), STUCK("stuck"),
TAG("tag"), TAG("tag"),
TNT("tnt"), TNT("tnt"),
TITLE("title"), TITLE("title"),
TITLE_COLOR("title.color"), TITLE_COLOR("title.color"),
TOGGLE_ALLIANCE_CHAT("togglealliancechat"), TOGGLE_ALLIANCE_CHAT("togglealliancechat"),
UNCLAIM("unclaim"), UNCLAIM("unclaim"),
UNCLAIM_ALL("unclaimall"), UNCLAIM_ALL("unclaimall"),
VERSION("version"), VERSION("version"),
SCOREBOARD("scoreboard"), SCOREBOARD("scoreboard"),
SEECHUNK("seechunk"), SEECHUNK("seechunk"),
SETWARP("setwarp"), SETWARP("setwarp"),
SHOP("shop"), SHOP("shop"),
TOP("top"), TOP("top"),
VIEWCHEST("viewchest"), VIEWCHEST("viewchest"),
ADDPOINTS("addpoints"), ADDPOINTS("addpoints"),
REMOVEPOINTS("removepoints"), REMOVEPOINTS("removepoints"),
SETPOINTS("setpoints"), SETPOINTS("setpoints"),
VAULT("vault"), VAULT("vault"),
GETVAULT("getvault"), GETVAULT("getvault"),
SETMAXVAULTS("setmaxvaults"), SETMAXVAULTS("setmaxvaults"),
RULES("rules"), RULES("rules"),
CHECKPOINT("checkpoint"), CHECKPOINT("checkpoint"),
UPGRADES("upgrades"), UPGRADES("upgrades"),
BANNER("banner"), BANNER("banner"),
TPBANNER("tpbanner"), TPBANNER("tpbanner"),
KILLHOLOS("killholos"), KILLHOLOS("killholos"),
INSPECT("inspect"), INSPECT("inspect"),
TNTFILL("tntfill"), TNTFILL("tntfill"),
COORD("coords"), COORD("coords"),
SHOWCLAIMS("showclaims"), SHOWCLAIMS("showclaims"),
WARP("warp"), WARP("warp"),
CHEST("chest"); CHEST("chest");
public final String node; public final String node;
Permission(final String node) { Permission(final String node) {
this.node = "factions." + node; this.node = "factions." + node;
} }
public boolean has(CommandSender sender, boolean informSenderIfNot) { public boolean has(CommandSender sender, boolean informSenderIfNot) {
return FactionsPlugin.getInstance().perm.has(sender, this.node, informSenderIfNot); return FactionsPlugin.getInstance().perm.has(sender, this.node, informSenderIfNot);
} }
public boolean has(CommandSender sender) { public boolean has(CommandSender sender) {
return has(sender, false); return has(sender, false);
} }
} }