类 PermissibleBase
java.lang.Object
org.bukkit.permissions.PermissibleBase
- 所有已实现的接口:
Permissible
,ServerOperator
Base Permissible for use in any Permissible object via proxy or extension
-
构造器概要
-
方法概要
修饰符和类型方法说明addAttachment
(@NotNull Plugin plugin) Adds a new emptyPermissionAttachment
to this objectaddAttachment
(@NotNull Plugin plugin, int ticks) Temporarily adds a new emptyPermissionAttachment
to this objectaddAttachment
(@NotNull Plugin plugin, @NotNull String name, boolean value) Adds a newPermissionAttachment
with a single permission by name and valueaddAttachment
(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks) Temporarily adds a newPermissionAttachment
with a single permission by name and valuevoid
Gets a set containing all of the permissions currently in effect by this objectboolean
hasPermission
(@NotNull String inName) 如果这个权限有设置在这个对象上, 就会返回这个权限的拥有状态.boolean
hasPermission
(@NotNull Permission perm) Gets the value of the specified permission, if set.boolean
isOp()
检查该对象是否为OP.boolean
isPermissionSet
(@NotNull String name) Checks if this object contains an override for the specified permission, by fully qualified nameboolean
Checks if this object contains an override for the specifiedPermission
void
Recalculates the permissions for this object, if the attachments have changed values.void
removeAttachment
(@NotNull PermissionAttachment attachment) Removes the givenPermissionAttachment
from this objectvoid
setOp
(boolean value) 设置此对象的op状态.
-
构造器详细资料
-
PermissibleBase
-
-
方法详细资料
-
isOp
public boolean isOp()从接口复制的说明:ServerOperator
检查该对象是否为OP.原文:Checks if this object is a server operator
- 指定者:
isOp
在接口中ServerOperator
- 返回:
- 如果为OP则返回true, 否则返回false
-
setOp
public void setOp(boolean value) 从接口复制的说明:ServerOperator
设置此对象的op状态.原文:Sets the operator status of this object
- 指定者:
setOp
在接口中ServerOperator
- 参数:
value
- 新op的值(布尔值)
-
isPermissionSet
从接口复制的说明:Permissible
Checks if this object contains an override for the specified permission, by fully qualified name- 指定者:
isPermissionSet
在接口中Permissible
- 参数:
name
- Name of the permission- 返回:
- true if the permission is set, otherwise false
-
isPermissionSet
从接口复制的说明:Permissible
Checks if this object contains an override for the specifiedPermission
- 指定者:
isPermissionSet
在接口中Permissible
- 参数:
perm
- Permission to check- 返回:
- true if the permission is set, otherwise false
-
hasPermission
从接口复制的说明:Permissible
如果这个权限有设置在这个对象上, 就会返回这个权限的拥有状态.如果这个权限没有设置在这个对象上, 将会返回这个权限的默认拥有状态.
原文: Gets the value of the specified permission, if set.
If a permission override is not set on this object, the default value of the permission will be returned.
- 指定者:
hasPermission
在接口中Permissible
- 参数:
inName
- 权限的名字- 返回:
- 是否拥有此权限
-
hasPermission
从接口复制的说明:Permissible
Gets the value of the specified permission, if set.If a permission override is not set on this object, the default value of the permission will be returned
- 指定者:
hasPermission
在接口中Permissible
- 参数:
perm
- Permission to get- 返回:
- Value of the permission
-
addAttachment
@NotNull public @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value) 从接口复制的说明:Permissible
Adds a newPermissionAttachment
with a single permission by name and value- 指定者:
addAttachment
在接口中Permissible
- 参数:
plugin
- Plugin responsible for this attachment, may not be null or disabledname
- Name of the permission to attachvalue
- Value of the permission- 返回:
- The PermissionAttachment that was just created
-
addAttachment
从接口复制的说明:Permissible
Adds a new emptyPermissionAttachment
to this object- 指定者:
addAttachment
在接口中Permissible
- 参数:
plugin
- Plugin responsible for this attachment, may not be null or disabled- 返回:
- The PermissionAttachment that was just created
-
removeAttachment
从接口复制的说明:Permissible
Removes the givenPermissionAttachment
from this object- 指定者:
removeAttachment
在接口中Permissible
- 参数:
attachment
- Attachment to remove
-
recalculatePermissions
public void recalculatePermissions()从接口复制的说明:Permissible
Recalculates the permissions for this object, if the attachments have changed values.This should very rarely need to be called from a plugin.
- 指定者:
recalculatePermissions
在接口中Permissible
-
clearPermissions
public void clearPermissions() -
addAttachment
@Nullable public @Nullable PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value, int ticks) 从接口复制的说明:Permissible
Temporarily adds a newPermissionAttachment
with a single permission by name and value- 指定者:
addAttachment
在接口中Permissible
- 参数:
plugin
- Plugin responsible for this attachment, may not be null or disabledname
- Name of the permission to attachvalue
- Value of the permissionticks
- Amount of ticks to automatically remove this attachment after- 返回:
- The PermissionAttachment that was just created
-
addAttachment
@Nullable public @Nullable PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, int ticks) 从接口复制的说明:Permissible
Temporarily adds a new emptyPermissionAttachment
to this object- 指定者:
addAttachment
在接口中Permissible
- 参数:
plugin
- Plugin responsible for this attachment, may not be null or disabledticks
- Amount of ticks to automatically remove this attachment after- 返回:
- The PermissionAttachment that was just created
-
getEffectivePermissions
从接口复制的说明:Permissible
Gets a set containing all of the permissions currently in effect by this object- 指定者:
getEffectivePermissions
在接口中Permissible
- 返回:
- Set of currently effective permissions
-