# 类的使用
org.bukkit.permissions.PermissionAttachment

使用PermissionAttachment的程序包
程序包
说明
org.bukkit.permissions
用于提供玩家二态属性的类(推测二态为是管理员与不是管理员两种状态).

- ## org.bukkit.permissions中PermissionAttachment的使用

  返回PermissionAttachment的org.bukkit.permissions中的方法
  修饰符和类型
  方法
  说明
  `@NotNull PermissionAttachment`
  Permissible.`addAttachment(@NotNull Plugin plugin)`
  Adds a new empty `PermissionAttachment` to this object
  `@Nullable PermissionAttachment`
  Permissible.`addAttachment(@NotNull Plugin plugin, int ticks)`
  Temporarily adds a new empty `PermissionAttachment` to this object
  `@NotNull PermissionAttachment`
  Permissible.`addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value)`
  Adds a new `PermissionAttachment` with a single permission by name and value
  `@Nullable PermissionAttachment`
  Permissible.`addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks)`
  Temporarily adds a new `PermissionAttachment` with a single permission by name and value
  `@NotNull PermissionAttachment`
  PermissibleBase.`addAttachment(@NotNull Plugin plugin)`
  `@Nullable PermissionAttachment`
  PermissibleBase.`addAttachment(@NotNull Plugin plugin, int ticks)`
  `@NotNull PermissionAttachment`
  PermissibleBase.`addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value)`
  `@Nullable PermissionAttachment`
  PermissibleBase.`addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks)`
  `@Nullable PermissionAttachment`
  PermissionAttachmentInfo.`getAttachment()`
  Gets the attachment providing this permission.
  参数类型为PermissionAttachment的org.bukkit.permissions中的方法
  修饰符和类型
  方法
  说明
  `void`
  PermissionRemovedExecutor.`attachmentRemoved(@NotNull PermissionAttachment attachment)`
  Called when a `PermissionAttachment` is removed from a `Permissible`
  `void`
  Permissible.`removeAttachment(@NotNull PermissionAttachment attachment)`
  Removes the given `PermissionAttachment` from this object
  `void`
  PermissibleBase.`removeAttachment(@NotNull PermissionAttachment attachment)`
  参数类型为PermissionAttachment的org.bukkit.permissions中的构造器
  限定符
  构造器
  说明
  ``
  `PermissionAttachmentInfo(@NotNull Permissible permissible, @NotNull String permission, @Nullable PermissionAttachment attachment, boolean value)`