2015-01-09 22:36:12 +01:00
|
|
|
package com.massivecraft.factions;
|
|
|
|
|
2016-05-26 10:17:44 +02:00
|
|
|
import com.massivecraft.massivecore.Identified;
|
2016-05-21 12:36:18 +02:00
|
|
|
import com.massivecraft.massivecore.util.PermissionUtil;
|
2017-03-24 13:05:58 +01:00
|
|
|
import org.bukkit.permissions.Permissible;
|
2015-01-09 22:36:12 +01:00
|
|
|
|
2016-05-26 10:17:44 +02:00
|
|
|
public enum Perm implements Identified
|
2015-01-09 22:36:12 +01:00
|
|
|
{
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// ENUM
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2015-08-28 09:00:24 +02:00
|
|
|
ACCESS,
|
|
|
|
ACCESS_VIEW,
|
|
|
|
ACCESS_PLAYER,
|
|
|
|
ACCESS_FACTION,
|
2016-02-02 19:03:11 +01:00
|
|
|
OVERRIDE,
|
2017-02-10 16:38:36 +01:00
|
|
|
BASECOMMAND,
|
2015-08-28 09:00:24 +02:00
|
|
|
CLAIM,
|
|
|
|
CLAIM_ONE,
|
|
|
|
CLAIM_AUTO,
|
|
|
|
CLAIM_FILL,
|
|
|
|
CLAIM_SQUARE,
|
|
|
|
CLAIM_CIRCLE,
|
|
|
|
CLAIM_ALL,
|
|
|
|
CREATE,
|
|
|
|
DESCRIPTION,
|
|
|
|
DISBAND,
|
|
|
|
EXPANSIONS,
|
|
|
|
FACTION,
|
|
|
|
FLAG,
|
|
|
|
FLAG_LIST,
|
|
|
|
FLAG_SET,
|
|
|
|
FLAG_SHOW,
|
|
|
|
HOME,
|
|
|
|
INVITE,
|
|
|
|
INVITE_LIST,
|
|
|
|
INVITE_LIST_OTHER,
|
|
|
|
INVITE_ADD,
|
|
|
|
INVITE_REMOVE,
|
|
|
|
JOIN,
|
|
|
|
JOIN_OTHERS,
|
|
|
|
KICK,
|
|
|
|
LEAVE,
|
|
|
|
LIST,
|
|
|
|
MAP,
|
|
|
|
MONEY,
|
|
|
|
MONEY_BALANCE,
|
|
|
|
MONEY_BALANCE_ANY,
|
|
|
|
MONEY_DEPOSIT,
|
|
|
|
MONEY_F2F,
|
|
|
|
MONEY_F2P,
|
|
|
|
MONEY_P2F,
|
|
|
|
MONEY_WITHDRAW,
|
|
|
|
MOTD,
|
|
|
|
OPEN,
|
|
|
|
PERM,
|
|
|
|
PERM_LIST,
|
|
|
|
PERM_SET,
|
|
|
|
PERM_SHOW,
|
|
|
|
PLAYER,
|
|
|
|
POWERBOOST,
|
2017-03-15 18:22:17 +01:00
|
|
|
POWERBOOST_PLAYER,
|
|
|
|
POWERBOOST_FACTION,
|
|
|
|
POWERBOOST_SET,
|
2015-08-28 09:00:24 +02:00
|
|
|
RANK,
|
|
|
|
RANK_SHOW,
|
|
|
|
RANK_ACTION,
|
|
|
|
RELATION,
|
2016-02-25 09:48:02 +01:00
|
|
|
RELATION_SET,
|
|
|
|
RELATION_LIST,
|
|
|
|
RELATION_WISHES,
|
2015-08-28 09:00:24 +02:00
|
|
|
SEECHUNK,
|
|
|
|
SEECHUNKOLD,
|
|
|
|
SETHOME,
|
|
|
|
SETPOWER,
|
|
|
|
STATUS,
|
|
|
|
NAME,
|
|
|
|
TITLE,
|
|
|
|
TITLE_COLOR,
|
|
|
|
TERRITORYTITLES,
|
|
|
|
UNCLAIM,
|
|
|
|
UNCLAIM_ONE,
|
|
|
|
UNCLAIM_AUTO,
|
|
|
|
UNCLAIM_FILL,
|
|
|
|
UNCLAIM_SQUARE,
|
|
|
|
UNCLAIM_CIRCLE,
|
|
|
|
UNCLAIM_ALL,
|
|
|
|
UNSETHOME,
|
2015-08-28 10:42:40 +02:00
|
|
|
UNSTUCK,
|
2017-02-22 08:22:08 +01:00
|
|
|
CONFIG,
|
2017-03-24 20:19:04 +01:00
|
|
|
CLEAN,
|
2015-08-28 09:00:24 +02:00
|
|
|
VERSION,
|
2015-01-09 22:36:12 +01:00
|
|
|
|
|
|
|
// END OF LIST
|
|
|
|
;
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// FIELDS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2016-05-26 10:17:44 +02:00
|
|
|
private final String id;
|
|
|
|
@Override public String getId() { return this.id; }
|
2015-01-09 22:36:12 +01:00
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// CONSTRUCT
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2015-08-28 09:00:24 +02:00
|
|
|
Perm()
|
2015-01-09 22:36:12 +01:00
|
|
|
{
|
2016-05-26 10:17:44 +02:00
|
|
|
this.id = PermissionUtil.createPermissionId(Factions.get(), this);
|
2015-01-09 22:36:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// HAS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2016-06-16 19:25:07 +02:00
|
|
|
public boolean has(Permissible permissible, boolean verboose)
|
2015-01-09 22:36:12 +01:00
|
|
|
{
|
2016-06-16 19:25:07 +02:00
|
|
|
return PermissionUtil.hasPermission(permissible, this, verboose);
|
2015-01-09 22:36:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean has(Permissible permissible)
|
|
|
|
{
|
2016-06-16 19:25:07 +02:00
|
|
|
return PermissionUtil.hasPermission(permissible, this);
|
2015-01-09 22:36:12 +01:00
|
|
|
}
|
|
|
|
|
2016-02-25 09:48:02 +01:00
|
|
|
}
|