Saber-Factions/src/main/java/com/massivecraft/factions/struct/Permission.java

93 lines
2.4 KiB
Java
Raw Normal View History

2011-10-08 18:44:47 +02:00
package com.massivecraft.factions.struct;
2014-04-04 20:55:21 +02:00
import com.massivecraft.factions.P;
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"),
ANNOUNCE("announce"),
2014-04-04 20:55:21 +02:00
AUTOCLAIM("autoclaim"),
BYPASS("bypass"),
CHAT("chat"),
CHATSPY("chatspy"),
CLAIM("claim"),
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"),
DEINVITE("deinvite"),
DESCRIPTION("description"),
DISBAND("disband"),
DISBAND_ANY("disband.any"),
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"),
MOD("mod"),
MOD_ANY("mod.any"),
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"),
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"),
SHOW_INVITES("showinvites"),
2014-04-04 20:55:21 +02:00
POWERBOOST("powerboost"),
POWER("power"),
POWER_ANY("power.any"),
RELATION("relation"),
RELOAD("reload"),
SAVE("save"),
SETHOME("sethome"),
SETHOME_ANY("sethome.any"),
SHOW("show"),
2014-10-15 18:45:16 +02:00
STATUS("status"),
2014-04-04 20:55:21 +02:00
TAG("tag"),
TITLE("title"),
UNCLAIM("unclaim"),
UNCLAIM_ALL("unclaimall"),
VERSION("version"),
SCOREBOARD("scoreboard"),
SEECHUNK("seechunk"),
SETWARP("setwarp"),
TOP("top"),
WARP("warp");
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) {
return P.p.perm.has(sender, this.node, informSenderIfNot);
}
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
}