2011-10-08 18:44:47 +02:00
|
|
|
package com.massivecraft.factions.struct;
|
|
|
|
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
2011-10-08 23:22:02 +02:00
|
|
|
import com.massivecraft.factions.P;
|
2011-10-08 18:44:47 +02:00
|
|
|
|
|
|
|
public enum Permission
|
|
|
|
{
|
2011-10-09 20:10:19 +02:00
|
|
|
MANAGE_SAFE_ZONE("managesafezone"),
|
|
|
|
MANAGE_WAR_ZONE("managewarzone"),
|
|
|
|
OWNERSHIP_BYPASS("ownershipbypass"),
|
2011-10-09 21:57:43 +02:00
|
|
|
ADMIN("admin"),
|
|
|
|
AUTOCLAIM("autoclaim"),
|
|
|
|
BYPASS("bypass"),
|
|
|
|
CHAT("chat"),
|
|
|
|
CLAIM("claim"),
|
|
|
|
CONFIG("config"),
|
|
|
|
CREATE("create"),
|
|
|
|
DEINVITE("deinvite"),
|
|
|
|
DESCRIPTION("description"),
|
|
|
|
DISBAND("disband"),
|
|
|
|
DISBAND_ANY("disband.any"),
|
|
|
|
HELP("help"),
|
|
|
|
HOME("home"),
|
|
|
|
INVITE("invite"),
|
|
|
|
JOIN("join"),
|
|
|
|
KICK("kick"),
|
|
|
|
KICK_ANY("kick.any"),
|
|
|
|
LEAVE("leave"),
|
|
|
|
LIST("list"),
|
|
|
|
LOCK("lock"),
|
|
|
|
MAP("map"),
|
|
|
|
MOD("mod"),
|
2011-10-13 14:41:07 +02:00
|
|
|
MONEY_BALANCE("money.balance"),
|
|
|
|
MONEY_BALANCE_ANY("money.balance.any"),
|
|
|
|
MONEY_DEPOSIT("money.deposit"),
|
|
|
|
MONEY_PAY("money.pay"),
|
|
|
|
MONEY_WITHDRAW("money.withdraw"),
|
|
|
|
MONEY_WITHDRAW_ANY("money.withdraw.any"),
|
2011-10-09 21:57:43 +02:00
|
|
|
NO_BOOM("noboom"),
|
|
|
|
OPEN("open"),
|
|
|
|
OWNER("owner"),
|
|
|
|
OWNERLIST("ownerlist"),
|
|
|
|
SET_PEACEFUL("setpeaceful"),
|
|
|
|
SET_PERMANENT("setpermanent"),
|
|
|
|
POWER("power"),
|
|
|
|
POWER_ANY("power.any"),
|
|
|
|
RELATION("relation"),
|
|
|
|
RELOAD("reload"),
|
|
|
|
SAVE("save"),
|
|
|
|
SETHOME("sethome"),
|
|
|
|
SETHOME_ANY("sethome.any"),
|
|
|
|
SHOW("show"),
|
|
|
|
TAG("tag"),
|
|
|
|
TITLE("title"),
|
|
|
|
UNCLAIM("unclaim"),
|
|
|
|
UNCLAIM_ALL("unclaimall"),
|
|
|
|
VERSION("version"),
|
2011-10-08 18:44:47 +02:00
|
|
|
;
|
|
|
|
|
|
|
|
public final String node;
|
|
|
|
|
|
|
|
Permission(final String node)
|
|
|
|
{
|
2011-10-09 14:53:38 +02:00
|
|
|
this.node = "factions."+node;
|
2011-10-08 18:44:47 +02:00
|
|
|
}
|
|
|
|
|
2011-10-08 23:22:02 +02:00
|
|
|
public boolean has(CommandSender sender, boolean informSenderIfNot)
|
|
|
|
{
|
|
|
|
return P.p.perm.has(sender, this.node, informSenderIfNot);
|
|
|
|
}
|
|
|
|
|
2011-10-08 18:44:47 +02:00
|
|
|
public boolean has(CommandSender sender)
|
2011-10-08 23:22:02 +02:00
|
|
|
{
|
|
|
|
return has(sender, false);
|
|
|
|
}
|
2011-10-08 18:44:47 +02:00
|
|
|
}
|