Getting back on course...
This commit is contained in:
parent
8e238e2b48
commit
6f5ba4c11b
1
src/main/java/com/massivecraft/factions/FactionsPlugin.java
Normal file → Executable file
1
src/main/java/com/massivecraft/factions/FactionsPlugin.java
Normal file → Executable file
@ -57,6 +57,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
|
||||
public class FactionsPlugin extends MPlugin {
|
||||
|
||||
// Our single plugin instance.
|
||||
// Single 4 life.
|
||||
public static FactionsPlugin instance;
|
||||
|
268
src/main/java/com/massivecraft/factions/struct/Permission.java
Normal file → Executable file
268
src/main/java/com/massivecraft/factions/struct/Permission.java
Normal file → Executable file
@ -4,142 +4,142 @@ import com.massivecraft.factions.FactionsPlugin;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
public enum Permission {
|
||||
MANAGE_SAFE_ZONE("managesafezone"),
|
||||
MANAGE_WAR_ZONE("managewarzone"),
|
||||
OWNERSHIP_BYPASS("ownershipbypass"),
|
||||
ADMIN("admin"),
|
||||
ALTS("alts"),
|
||||
ADMIN_ANY("admin.any"),
|
||||
AHOME("ahome"),
|
||||
ANNOUNCE("announce"),
|
||||
AUTOCLAIM("autoclaim"),
|
||||
AUTO_LEAVE_BYPASS("autoleavebypass"),
|
||||
BAN("ban"),
|
||||
BYPASS("bypass"),
|
||||
CHAT("chat"),
|
||||
CHATSPY("chatspy"),
|
||||
CHECK("check"),
|
||||
CLAIM("claim"),
|
||||
CLAIMAT("claimat"),
|
||||
CLAIM_LINE("claim.line"),
|
||||
CLAIM_RADIUS("claim.radius"),
|
||||
CONFIG("config"),
|
||||
CONVERT("convert"),
|
||||
CONVERTCONFIG("convertconfig"),
|
||||
CREATE("create"),
|
||||
CORNER("corner"),
|
||||
DEFAULTRANK("defaultrank"),
|
||||
DEINVITE("deinvite"),
|
||||
DELHOME("delhome"),
|
||||
DESCRIPTION("description"),
|
||||
DISBAND("disband"),
|
||||
DISBAND_ANY("disband.any"),
|
||||
FLY("fly"),
|
||||
FOCUS("focus"),
|
||||
GLOBALCHAT("globalchat"),
|
||||
GRACE("grace"),
|
||||
HELP("help"),
|
||||
HOME("home"),
|
||||
INVITE("invite"),
|
||||
INVSEE("invsee"),
|
||||
JOIN("join"),
|
||||
JOIN_ANY("join.any"),
|
||||
JOIN_OTHERS("join.others"),
|
||||
KICK("kick"),
|
||||
KICK_ANY("kick.any"),
|
||||
LEAVE("leave"),
|
||||
LIST("list"),
|
||||
LOCK("lock"),
|
||||
LOGOUT("logout"),
|
||||
MAP("map"),
|
||||
MAPHEIGHT("mapheight"),
|
||||
MOD("mod"),
|
||||
COLEADER("coleader"),
|
||||
MOD_ANY("mod.any"),
|
||||
COLEADER_ANY("coleader.any"),
|
||||
MISSIONS("missions"),
|
||||
MODIFY_POWER("modifypower"),
|
||||
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"),
|
||||
NEAR("near"),
|
||||
NO_BOOM("noboom"),
|
||||
OPEN("open"),
|
||||
OWNER("owner"),
|
||||
OWNERLIST("ownerlist"),
|
||||
SET_PEACEFUL("setpeaceful"),
|
||||
SET_PERMANENT("setpermanent"),
|
||||
SET_PERMANENTPOWER("setpermanentpower"),
|
||||
SHOW_INVITES("showinvites"),
|
||||
PAYPAL("paypal"),
|
||||
PAYPALSET("setpaypal"),
|
||||
PERMISSIONS("permissions"),
|
||||
POINTS("points"),
|
||||
POWERBOOST("powerboost"),
|
||||
POWER("power"),
|
||||
POWER_ANY("power.any"),
|
||||
PROMOTE("promote"),
|
||||
RELATION("relation"),
|
||||
RELOAD("reload"),
|
||||
SAVE("save"),
|
||||
SPAM("spam"),
|
||||
SETHOME("sethome"),
|
||||
SETHOME_ANY("sethome.any"),
|
||||
SETSTRIKES("setstrikes"),
|
||||
SHOW("show"),
|
||||
STATUS("status"),
|
||||
STEALTH("stealth"),
|
||||
STUCK("stuck"),
|
||||
TAG("tag"),
|
||||
TNT("tnt"),
|
||||
TITLE("title"),
|
||||
TITLE_COLOR("title.color"),
|
||||
TOGGLE_ALLIANCE_CHAT("togglealliancechat"),
|
||||
UNCLAIM("unclaim"),
|
||||
UNCLAIM_ALL("unclaimall"),
|
||||
VERSION("version"),
|
||||
SCOREBOARD("scoreboard"),
|
||||
SEECHUNK("seechunk"),
|
||||
SETWARP("setwarp"),
|
||||
SHOP("shop"),
|
||||
TOP("top"),
|
||||
VIEWCHEST("viewchest"),
|
||||
ADDPOINTS("addpoints"),
|
||||
REMOVEPOINTS("removepoints"),
|
||||
SETPOINTS("setpoints"),
|
||||
VAULT("vault"),
|
||||
GETVAULT("getvault"),
|
||||
SETMAXVAULTS("setmaxvaults"),
|
||||
RULES("rules"),
|
||||
CHECKPOINT("checkpoint"),
|
||||
UPGRADES("upgrades"),
|
||||
BANNER("banner"),
|
||||
TPBANNER("tpbanner"),
|
||||
KILLHOLOS("killholos"),
|
||||
INSPECT("inspect"),
|
||||
TNTFILL("tntfill"),
|
||||
COORD("coords"),
|
||||
SHOWCLAIMS("showclaims"),
|
||||
WARP("warp"),
|
||||
CHEST("chest");
|
||||
MANAGE_SAFE_ZONE("managesafezone"),
|
||||
MANAGE_WAR_ZONE("managewarzone"),
|
||||
OWNERSHIP_BYPASS("ownershipbypass"),
|
||||
ADMIN("admin"),
|
||||
ALTS("alts"),
|
||||
ADMIN_ANY("admin.any"),
|
||||
AHOME("ahome"),
|
||||
ANNOUNCE("announce"),
|
||||
AUTOCLAIM("autoclaim"),
|
||||
AUTO_LEAVE_BYPASS("autoleavebypass"),
|
||||
BAN("ban"),
|
||||
BYPASS("bypass"),
|
||||
CHAT("chat"),
|
||||
CHATSPY("chatspy"),
|
||||
CHECK("check"),
|
||||
CLAIM("claim"),
|
||||
CLAIMAT("claimat"),
|
||||
CLAIM_LINE("claim.line"),
|
||||
CLAIM_RADIUS("claim.radius"),
|
||||
CONFIG("config"),
|
||||
CONVERT("convert"),
|
||||
CONVERTCONFIG("convertconfig"),
|
||||
CREATE("create"),
|
||||
CORNER("corner"),
|
||||
DEFAULTRANK("defaultrank"),
|
||||
DEINVITE("deinvite"),
|
||||
DELHOME("delhome"),
|
||||
DESCRIPTION("description"),
|
||||
DISBAND("disband"),
|
||||
DISBAND_ANY("disband.any"),
|
||||
FLY("fly"),
|
||||
FOCUS("focus"),
|
||||
GLOBALCHAT("globalchat"),
|
||||
GRACE("grace"),
|
||||
HELP("help"),
|
||||
HOME("home"),
|
||||
INVITE("invite"),
|
||||
INVSEE("invsee"),
|
||||
JOIN("join"),
|
||||
JOIN_ANY("join.any"),
|
||||
JOIN_OTHERS("join.others"),
|
||||
KICK("kick"),
|
||||
KICK_ANY("kick.any"),
|
||||
LEAVE("leave"),
|
||||
LIST("list"),
|
||||
LOCK("lock"),
|
||||
LOGOUT("logout"),
|
||||
MAP("map"),
|
||||
MAPHEIGHT("mapheight"),
|
||||
MOD("mod"),
|
||||
COLEADER("coleader"),
|
||||
MOD_ANY("mod.any"),
|
||||
COLEADER_ANY("coleader.any"),
|
||||
MISSIONS("missions"),
|
||||
MODIFY_POWER("modifypower"),
|
||||
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"),
|
||||
NEAR("near"),
|
||||
NO_BOOM("noboom"),
|
||||
OPEN("open"),
|
||||
OWNER("owner"),
|
||||
OWNERLIST("ownerlist"),
|
||||
SET_PEACEFUL("setpeaceful"),
|
||||
SET_PERMANENT("setpermanent"),
|
||||
SET_PERMANENTPOWER("setpermanentpower"),
|
||||
SHOW_INVITES("showinvites"),
|
||||
PAYPAL("paypal"),
|
||||
PAYPALSET("setpaypal"),
|
||||
PERMISSIONS("permissions"),
|
||||
POINTS("points"),
|
||||
POWERBOOST("powerboost"),
|
||||
POWER("power"),
|
||||
POWER_ANY("power.any"),
|
||||
PROMOTE("promote"),
|
||||
RELATION("relation"),
|
||||
RELOAD("reload"),
|
||||
SAVE("save"),
|
||||
SPAM("spam"),
|
||||
SETHOME("sethome"),
|
||||
SETHOME_ANY("sethome.any"),
|
||||
SETSTRIKES("setstrikes"),
|
||||
SHOW("show"),
|
||||
STATUS("status"),
|
||||
STEALTH("stealth"),
|
||||
STUCK("stuck"),
|
||||
TAG("tag"),
|
||||
TNT("tnt"),
|
||||
TITLE("title"),
|
||||
TITLE_COLOR("title.color"),
|
||||
TOGGLE_ALLIANCE_CHAT("togglealliancechat"),
|
||||
UNCLAIM("unclaim"),
|
||||
UNCLAIM_ALL("unclaimall"),
|
||||
VERSION("version"),
|
||||
SCOREBOARD("scoreboard"),
|
||||
SEECHUNK("seechunk"),
|
||||
SETWARP("setwarp"),
|
||||
SHOP("shop"),
|
||||
TOP("top"),
|
||||
VIEWCHEST("viewchest"),
|
||||
ADDPOINTS("addpoints"),
|
||||
REMOVEPOINTS("removepoints"),
|
||||
SETPOINTS("setpoints"),
|
||||
VAULT("vault"),
|
||||
GETVAULT("getvault"),
|
||||
SETMAXVAULTS("setmaxvaults"),
|
||||
RULES("rules"),
|
||||
CHECKPOINT("checkpoint"),
|
||||
UPGRADES("upgrades"),
|
||||
BANNER("banner"),
|
||||
TPBANNER("tpbanner"),
|
||||
KILLHOLOS("killholos"),
|
||||
INSPECT("inspect"),
|
||||
TNTFILL("tntfill"),
|
||||
COORD("coords"),
|
||||
SHOWCLAIMS("showclaims"),
|
||||
WARP("warp"),
|
||||
CHEST("chest");
|
||||
|
||||
public final String node;
|
||||
public final String node;
|
||||
|
||||
Permission(final String node) {
|
||||
this.node = "factions." + node;
|
||||
}
|
||||
Permission(final String node) {
|
||||
this.node = "factions." + node;
|
||||
}
|
||||
|
||||
public boolean has(CommandSender sender, boolean informSenderIfNot) {
|
||||
return FactionsPlugin.getInstance().perm.has(sender, this.node, informSenderIfNot);
|
||||
}
|
||||
public boolean has(CommandSender sender, boolean informSenderIfNot) {
|
||||
return FactionsPlugin.getInstance().perm.has(sender, this.node, informSenderIfNot);
|
||||
}
|
||||
|
||||
public boolean has(CommandSender sender) {
|
||||
return has(sender, false);
|
||||
}
|
||||
public boolean has(CommandSender sender) {
|
||||
return has(sender, false);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user