类 PermissionAttachment
Permissible对象上权限附件的信息-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明获取此附件附加到的Permissible.获取此附件中包含的所有已设置权限和值的副本.获取负责此附件的插件.获取之前设置的当此附件从Permissible移除时调用的类.booleanremove()从此附件注册的Permissible中移除此附件.voidsetPermission(@NotNull String name, boolean value) 通过完全限定名称设置权限为给定值.voidsetPermission(@NotNull Permission perm, boolean value) 设置权限为给定值.void设置当此附件从Permissible移除时调用的对象.voidunsetPermission(@NotNull String name) 从此附件中移除指定权限.void从此附件中移除指定权限.
-
构造器详细资料
-
PermissionAttachment
-
-
方法详细资料
-
getPlugin
获取负责此附件的插件.原文: Gets the plugin responsible for this attachment
- 返回:
- 负责此权限附件的插件
-
setRemovalCallback
设置当此附件从Permissible移除时调用的对象. 可能为null.原文: Sets an object to be called for when this attachment is removed from a
Permissible. May be null.- 参数:
ex- 移除时调用的对象
-
getRemovalCallback
获取之前设置的当此附件从Permissible移除时调用的类. 可能为null.原文: Gets the class that was previously set to be called when this attachment was removed from a
Permissible. May be null.- 返回:
- 移除时调用的对象
-
getPermissible
获取此附件附加到的Permissible.原文: Gets the Permissible that this is attached to
- 返回:
- 包含此附件的Permissible
-
getPermissions
获取此附件中包含的所有已设置权限和值的副本.此映射可以被修改但不会影响附件, 因为它是一个副本.
原文: Gets a copy of all set permissions and values contained within this attachment.
This map may be modified but will not affect the attachment, as it is a copy.
- 返回:
- 此附件表达的所有权限和值的副本
-
setPermission
通过完全限定名称设置权限为给定值.原文: Sets a permission to the given value, by its fully qualified name
- 参数:
name- 权限名称value- 权限的新值
-
setPermission
设置权限为给定值.原文: Sets a permission to the given value
- 参数:
perm- 要设置的权限value- 权限的新值
-
unsetPermission
从此附件中移除指定权限.如果此附件中不存在该权限, 什么也不会发生.
原文: Removes the specified permission from this attachment.
If the permission does not exist in this attachment, nothing will happen.
- 参数:
name- 要移除的权限名称
-
unsetPermission
从此附件中移除指定权限.如果此附件中不存在该权限, 什么也不会发生.
原文: Removes the specified permission from this attachment.
If the permission does not exist in this attachment, nothing will happen.
- 参数:
perm- 要移除的权限
-
remove
public boolean remove()从此附件注册的Permissible中移除此附件.原文: Removes this attachment from its registered
Permissible- 返回:
- 如果可权限对象被成功移除返回true, 如果不存在返回false
-