Enum Class DefaultPermissionHandler
java.lang.Object
java.lang.Enum<DefaultPermissionHandler>
net.minecraftforge.server.permission.DefaultPermissionHandler
- All Implemented Interfaces:
Serializable
,Comparable<DefaultPermissionHandler>
,Constable
,IPermissionHandler
public enum DefaultPermissionHandler
extends Enum<DefaultPermissionHandler>
implements IPermissionHandler
Default implementation of PermissionAPI.
hasPermission(GameProfile, String, IContext)
is based on DefaultPermissionLevel- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetNodeDescription
(String node) boolean
hasPermission
(com.mojang.authlib.GameProfile profile, String node, IContext context) void
registerNode
(String node, DefaultPermissionLevel level, String desc) static DefaultPermissionHandler
Returns the enum constant of this class with the specified name.static DefaultPermissionHandler[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Field Details
-
PERMISSION_LEVEL_MAP
-
DESCRIPTION_MAP
-
-
Constructor Details
-
DefaultPermissionHandler
private DefaultPermissionHandler()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
registerNode
Description copied from interface:IPermissionHandler
- Specified by:
registerNode
in interfaceIPermissionHandler
-
getRegisteredNodes
- Specified by:
getRegisteredNodes
in interfaceIPermissionHandler
- Returns:
- Immutable collection of all registered nodes
-
hasPermission
public boolean hasPermission(com.mojang.authlib.GameProfile profile, String node, @Nullable IContext context) Description copied from interface:IPermissionHandler
- Specified by:
hasPermission
in interfaceIPermissionHandler
-
getNodeDescription
- Specified by:
getNodeDescription
in interfaceIPermissionHandler
- Parameters:
node
- Permission node- Returns:
- Description of the node. "" in case this node doesn't have a decription
- See Also:
-
getDefaultPermissionLevel
- Returns:
- The default permission level of a node. If the permission isn't registred, it will return NONE
-