public enum DefaultPermissionHandler extends java.lang.Enum<DefaultPermissionHandler> implements IPermissionHandler
hasPermission(GameProfile, String, IContext)
is based on DefaultPermissionLevelIPermissionHandler
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Field and Description |
---|---|
private static java.util.HashMap<java.lang.String,java.lang.String> |
DESCRIPTION_MAP |
private static java.util.HashMap<java.lang.String,DefaultPermissionLevel> |
PERMISSION_LEVEL_MAP |
Modifier and Type | Method and Description |
---|---|
DefaultPermissionLevel |
getDefaultPermissionLevel(java.lang.String node) |
java.lang.String |
getNodeDescription(java.lang.String node) |
java.util.Collection<java.lang.String> |
getRegisteredNodes() |
boolean |
hasPermission(com.mojang.authlib.GameProfile profile,
java.lang.String node,
IContext context)
|
void |
registerNode(java.lang.String node,
DefaultPermissionLevel level,
java.lang.String desc)
|
static DefaultPermissionHandler |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DefaultPermissionHandler[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DefaultPermissionHandler INSTANCE
private static final java.util.HashMap<java.lang.String,DefaultPermissionLevel> PERMISSION_LEVEL_MAP
private static final java.util.HashMap<java.lang.String,java.lang.String> DESCRIPTION_MAP
public static DefaultPermissionHandler[] values()
for (DefaultPermissionHandler c : DefaultPermissionHandler.values()) System.out.println(c);
public static DefaultPermissionHandler valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void registerNode(java.lang.String node, DefaultPermissionLevel level, java.lang.String desc)
IPermissionHandler
registerNode
in interface IPermissionHandler
public java.util.Collection<java.lang.String> getRegisteredNodes()
getRegisteredNodes
in interface IPermissionHandler
public boolean hasPermission(com.mojang.authlib.GameProfile profile, java.lang.String node, @Nullable IContext context)
IPermissionHandler
hasPermission
in interface IPermissionHandler
public java.lang.String getNodeDescription(java.lang.String node)
getNodeDescription
in interface IPermissionHandler
node
- Permission nodeIPermissionHandler.registerNode(String, DefaultPermissionLevel, String)
public DefaultPermissionLevel getDefaultPermissionLevel(java.lang.String node)