类 DefaultPermissionHandler
java.lang.Object
net.neoforged.neoforge.server.permission.handler.DefaultPermissionHandler
- 所有已实现的接口:
IPermissionHandler
-
字段概要
字段修饰符和类型字段说明static final ResourceLocation
private Set
<PermissionNode<?>> private final Set
<PermissionNode<?>> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明返回 an identifier for the PermissionHandler。<T> T
getOfflinePermission
(UUID player, PermissionNode<T> node, PermissionDynamicContext<?>... context) <T> T
getPermission
(ServerPlayer player, PermissionNode<T> node, PermissionDynamicContext<?>... context) Set
<PermissionNode<?>> 返回 an unmodifiable view of the collection of registered permission nodes。
-
字段详细资料
-
IDENTIFIER
-
registeredNodes
-
immutableRegisteredNodes
-
-
构造器详细资料
-
DefaultPermissionHandler
-
-
方法详细资料
-
getIdentifier
从接口复制的说明:IPermissionHandler
返回 an identifier for the PermissionHandler。- 指定者:
getIdentifier
在接口中IPermissionHandler
- 返回:
- an identifier for the PermissionHandler
-
getRegisteredNodes
从接口复制的说明:IPermissionHandler
返回 an unmodifiable view of the collection of registered permission nodes。- 指定者:
getRegisteredNodes
在接口中IPermissionHandler
- 返回:
- an unmodifiable view of the collection of registered permission nodes
-
getPermission
public <T> T getPermission(ServerPlayer player, PermissionNode<T> node, PermissionDynamicContext<?>... context) 从接口复制的说明:IPermissionHandler
Mods must usePermissionAPI.getPermission(ServerPlayer, PermissionNode, PermissionDynamicContext[])
Queries a player's permission for a given node and contexts
Warning: PermissionNodes must be registered using the
PermissionGatherEvent.Nodes
event before querying.- 指定者:
getPermission
在接口中IPermissionHandler
- 类型参数:
T
- type of the queried PermissionNode- 参数:
player
- player for which you want to check permissionsnode
- the PermissionNode for which you want to querycontext
- optional array of PermissionDynamicContext, single entries will be ignored if they weren't registered to the node- 返回:
- a value of type
<T>
, that the combination of Player and PermissionNode map to.
-
getOfflinePermission
public <T> T getOfflinePermission(UUID player, PermissionNode<T> node, PermissionDynamicContext<?>... context) 从接口复制的说明:IPermissionHandler
- 指定者:
getOfflinePermission
在接口中IPermissionHandler
- 类型参数:
T
- type of the queried PermissionNode- 参数:
player
- offline player for which you want to check permissionsnode
- the PermissionNode for which you want to querycontext
- optional array of PermissionDynamicContext, single entries will be ignored if they weren't registered to the node- 返回:
- a value of type
<T>
, that the combination of Player and PermissionNode map to.
-