2011-10-08 18:44:47 +02:00
|
|
|
package com.massivecraft.factions.struct;
|
|
|
|
|
2018-10-23 01:42:57 +02:00
|
|
|
import com.massivecraft.factions.SavageFactions;
|
2011-10-08 18:44:47 +02:00
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public enum Permission {
|
|
|
|
MANAGE_SAFE_ZONE("managesafezone"),
|
|
|
|
MANAGE_WAR_ZONE("managewarzone"),
|
|
|
|
OWNERSHIP_BYPASS("ownershipbypass"),
|
|
|
|
ADMIN("admin"),
|
|
|
|
ADMIN_ANY("admin.any"),
|
2015-09-08 19:18:00 +02:00
|
|
|
AHOME("ahome"),
|
2014-10-18 10:54:45 +02:00
|
|
|
ANNOUNCE("announce"),
|
2014-04-04 20:55:21 +02:00
|
|
|
AUTOCLAIM("autoclaim"),
|
2016-05-30 02:33:46 +02:00
|
|
|
AUTO_LEAVE_BYPASS("autoleavebypass"),
|
2018-03-01 05:23:37 +01:00
|
|
|
BAN("ban"),
|
2014-04-04 20:55:21 +02:00
|
|
|
BYPASS("bypass"),
|
|
|
|
CHAT("chat"),
|
|
|
|
CHATSPY("chatspy"),
|
|
|
|
CLAIM("claim"),
|
2018-02-13 03:09:02 +01:00
|
|
|
CLAIMAT("claimat"),
|
2015-01-23 05:38:46 +01:00
|
|
|
CLAIM_LINE("claim.line"),
|
2014-04-04 20:55:21 +02:00
|
|
|
CLAIM_RADIUS("claim.radius"),
|
|
|
|
CONFIG("config"),
|
|
|
|
CREATE("create"),
|
2018-01-05 02:37:21 +01:00
|
|
|
DEFAULTRANK("defaultrank"),
|
2014-04-04 20:55:21 +02:00
|
|
|
DEINVITE("deinvite"),
|
|
|
|
DESCRIPTION("description"),
|
|
|
|
DISBAND("disband"),
|
|
|
|
DISBAND_ANY("disband.any"),
|
2018-03-04 23:16:17 +01:00
|
|
|
FLY("fly"),
|
2014-04-04 20:55:21 +02:00
|
|
|
HELP("help"),
|
|
|
|
HOME("home"),
|
|
|
|
INVITE("invite"),
|
|
|
|
JOIN("join"),
|
|
|
|
JOIN_ANY("join.any"),
|
|
|
|
JOIN_OTHERS("join.others"),
|
|
|
|
KICK("kick"),
|
|
|
|
KICK_ANY("kick.any"),
|
|
|
|
LEAVE("leave"),
|
|
|
|
LIST("list"),
|
|
|
|
LOCK("lock"),
|
|
|
|
MAP("map"),
|
2018-02-11 01:20:13 +01:00
|
|
|
MAPHEIGHT("mapheight"),
|
2014-04-04 20:55:21 +02:00
|
|
|
MOD("mod"),
|
2018-03-26 23:43:15 +02:00
|
|
|
COLEADER("coleader"),
|
2014-04-04 20:55:21 +02:00
|
|
|
MOD_ANY("mod.any"),
|
2018-03-26 23:43:15 +02:00
|
|
|
COLEADER_ANY("coleader.any"),
|
2014-11-14 20:27:23 +01:00
|
|
|
MODIFY_POWER("modifypower"),
|
2014-04-04 20:55:21 +02:00
|
|
|
MONEY_BALANCE("money.balance"),
|
|
|
|
MONEY_BALANCE_ANY("money.balance.any"),
|
|
|
|
MONEY_DEPOSIT("money.deposit"),
|
|
|
|
MONEY_WITHDRAW("money.withdraw"),
|
|
|
|
MONEY_WITHDRAW_ANY("money.withdraw.any"),
|
|
|
|
MONEY_F2F("money.f2f"),
|
|
|
|
MONEY_F2P("money.f2p"),
|
|
|
|
MONEY_P2F("money.p2f"),
|
2015-01-06 23:06:46 +01:00
|
|
|
MONITOR_LOGINS("monitorlogins"),
|
2014-04-04 20:55:21 +02:00
|
|
|
NO_BOOM("noboom"),
|
|
|
|
OPEN("open"),
|
|
|
|
OWNER("owner"),
|
|
|
|
OWNERLIST("ownerlist"),
|
|
|
|
SET_PEACEFUL("setpeaceful"),
|
|
|
|
SET_PERMANENT("setpermanent"),
|
|
|
|
SET_PERMANENTPOWER("setpermanentpower"),
|
2014-10-14 20:30:05 +02:00
|
|
|
SHOW_INVITES("showinvites"),
|
2018-09-21 08:29:28 +02:00
|
|
|
PAYPALSET("setpaypal"),
|
2018-01-05 08:01:52 +01:00
|
|
|
PERMISSIONS("permissions"),
|
2014-04-04 20:55:21 +02:00
|
|
|
POWERBOOST("powerboost"),
|
|
|
|
POWER("power"),
|
|
|
|
POWER_ANY("power.any"),
|
2018-01-05 08:01:52 +01:00
|
|
|
PROMOTE("promote"),
|
2014-04-04 20:55:21 +02:00
|
|
|
RELATION("relation"),
|
|
|
|
RELOAD("reload"),
|
|
|
|
SAVE("save"),
|
|
|
|
SETHOME("sethome"),
|
|
|
|
SETHOME_ANY("sethome.any"),
|
|
|
|
SHOW("show"),
|
2014-10-15 18:45:16 +02:00
|
|
|
STATUS("status"),
|
2018-07-30 18:05:28 +02:00
|
|
|
STEALTH("stealth"),
|
2015-05-13 05:16:47 +02:00
|
|
|
STUCK("stuck"),
|
2014-04-04 20:55:21 +02:00
|
|
|
TAG("tag"),
|
2018-03-26 23:43:15 +02:00
|
|
|
TNT("tnt"),
|
2014-04-04 20:55:21 +02:00
|
|
|
TITLE("title"),
|
2018-02-16 03:02:59 +01:00
|
|
|
TITLE_COLOR("title.color"),
|
2015-03-05 05:55:46 +01:00
|
|
|
TOGGLE_ALLIANCE_CHAT("togglealliancechat"),
|
2014-04-04 20:55:21 +02:00
|
|
|
UNCLAIM("unclaim"),
|
|
|
|
UNCLAIM_ALL("unclaimall"),
|
2014-08-05 17:17:27 +02:00
|
|
|
VERSION("version"),
|
2014-10-19 23:04:27 +02:00
|
|
|
SCOREBOARD("scoreboard"),
|
2014-11-07 18:49:54 +01:00
|
|
|
SEECHUNK("seechunk"),
|
|
|
|
SETWARP("setwarp"),
|
2015-01-23 16:07:18 +01:00
|
|
|
TOP("top"),
|
2016-05-31 01:22:45 +02:00
|
|
|
VAULT("vault"),
|
2018-03-26 23:43:15 +02:00
|
|
|
GETVAULT("getvault"),
|
2016-05-31 01:22:45 +02:00
|
|
|
SETMAXVAULTS("setmaxvaults"),
|
2018-03-26 23:43:15 +02:00
|
|
|
RULES("rules"),
|
|
|
|
CHECKPOINT("checkpoint"),
|
|
|
|
UPGRADES("upgrades"),
|
|
|
|
BANNER("banner"),
|
|
|
|
TPBANNER("tpbanner"),
|
|
|
|
KILLHOLOS("killholos"),
|
2018-04-09 05:13:41 +02:00
|
|
|
INSPECT("inspect"),
|
2018-04-14 04:05:43 +02:00
|
|
|
TNTFILL("tntfill"),
|
2018-04-18 03:01:53 +02:00
|
|
|
COORD("coords"),
|
|
|
|
SHOWCLAIMS("showclaims"),
|
2018-05-12 00:47:58 +02:00
|
|
|
WARP("warp"),
|
|
|
|
CHEST("Chest");
|
2014-04-04 20:55:21 +02:00
|
|
|
|
|
|
|
public final String node;
|
|
|
|
|
|
|
|
Permission(final String node) {
|
|
|
|
this.node = "factions." + node;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean has(CommandSender sender, boolean informSenderIfNot) {
|
2018-11-07 06:38:43 +01:00
|
|
|
return SavageFactions.plugin.perm.has(sender, this.node, informSenderIfNot);
|
2014-04-04 20:55:21 +02:00
|
|
|
}
|
2011-10-08 18:44:47 +02:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public boolean has(CommandSender sender) {
|
|
|
|
return has(sender, false);
|
|
|
|
}
|
2011-10-08 18:44:47 +02:00
|
|
|
}
|