程序包 org.bukkit.permissions

# 类 PermissibleBase

java.lang.Object
org.bukkit.permissions.PermissibleBase

所有已实现的接口:
  `Permissible`, `ServerOperator`

public class PermissibleBase extends Object implements Permissible
Base Permissible for use in any Permissible object via proxy or extension

- ## 构造器概要

  构造器
  构造器
  说明
  `PermissibleBase(@Nullable ServerOperator opable)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull PermissionAttachment`
  `addAttachment(@NotNull Plugin plugin)`
  Adds a new empty `PermissionAttachment` to this object
  `@Nullable PermissionAttachment`
  `addAttachment(@NotNull Plugin plugin, int ticks)`
  Temporarily adds a new empty `PermissionAttachment` to this object
  `@NotNull PermissionAttachment`
  `addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value)`
  Adds a new `PermissionAttachment` with a single permission by name and value
  `@Nullable PermissionAttachment`
  `addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks)`
  Temporarily adds a new `PermissionAttachment` with a single permission by name and value
  `void`
  `clearPermissions()`
  `@NotNull Set<PermissionAttachmentInfo>`
  `getEffectivePermissions()`
  Gets a set containing all of the permissions currently in effect by this object
  `boolean`
  `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 name
  `boolean`
  `isPermissionSet(@NotNull Permission perm)`
  Checks if this object contains an override for the specified `Permission`
  `void`
  `recalculatePermissions()`
  Recalculates the permissions for this object, if the attachments have changed values.
  `void`
  `removeAttachment(@NotNull PermissionAttachment attachment)`
  Removes the given `PermissionAttachment` from this object
  `void`
  `setOp(boolean value)`
  设置此对象的op状态.

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### PermissibleBase

    public PermissibleBase(@Nullable @Nullable ServerOperator opable)

- ## 方法详细资料

  - ### 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

    public boolean isPermissionSet(@NotNull @NotNull String name)
    从接口复制的说明: `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

    public boolean isPermissionSet(@NotNull @NotNull Permission perm)
    从接口复制的说明: `Permissible`
    Checks if this object contains an override for the specified `Permission`
    指定者:
      `isPermissionSet` 在接口中 `Permissible`
    参数:
      `perm` - Permission to check
    返回:
      true if the permission is set, otherwise false

  - ### hasPermission

    public boolean hasPermission(@NotNull @NotNull String inName)
    从接口复制的说明: `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

    public boolean hasPermission(@NotNull @NotNull Permission perm)
    从接口复制的说明: `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 new `PermissionAttachment` with a single permission by name and value
    指定者:
      `addAttachment` 在接口中 `Permissible`
    参数:
      `plugin` - Plugin responsible for this attachment, may not be null or disabled
      `name` - Name of the permission to attach
      `value` - Value of the permission
    返回:
      The PermissionAttachment that was just created

  - ### addAttachment

    @NotNull public @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin)
    从接口复制的说明: `Permissible`
    Adds a new empty `PermissionAttachment` to this object
    指定者:
      `addAttachment` 在接口中 `Permissible`
    参数:
      `plugin` - Plugin responsible for this attachment, may not be null or disabled
    返回:
      The PermissionAttachment that was just created

  - ### removeAttachment

    public void removeAttachment(@NotNull @NotNull PermissionAttachment attachment)
    从接口复制的说明: `Permissible`
    Removes the given `PermissionAttachment` 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 new `PermissionAttachment` with a single permission by name and value
    指定者:
      `addAttachment` 在接口中 `Permissible`
    参数:
      `plugin` - Plugin responsible for this attachment, may not be null or disabled
      `name` - Name of the permission to attach
      `value` - Value of the permission
      `ticks` - 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 empty `PermissionAttachment` to this object
    指定者:
      `addAttachment` 在接口中 `Permissible`
    参数:
      `plugin` - Plugin responsible for this attachment, may not be null or disabled
      `ticks` - Amount of ticks to automatically remove this attachment after
    返回:
      The PermissionAttachment that was just created

  - ### getEffectivePermissions

    @NotNull public @NotNull Set<PermissionAttachmentInfo> getEffectivePermissions()
    从接口复制的说明: `Permissible`
    Gets a set containing all of the permissions currently in effect by this object
    指定者:
      `getEffectivePermissions` 在接口中 `Permissible`
    返回:
      Set of currently effective permissions