程序包 org.bukkit.event.inventory

# 类 InventoryOpenEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
org.bukkit.event.inventory.InventoryOpenEvent

所有已实现的接口:
  `Cancellable`

public class InventoryOpenEvent extends InventoryEvent implements Cancellable
当玩家打开物品栏时触发本事件

- ## 嵌套类概要

  ## 从类继承的嵌套类/接口 org.bukkit.event.Event

  `Event.Result`

- ## 字段概要

  ### 从类继承的字段 org.bukkit.event.inventory.InventoryEvent

  `transaction`

- ## 构造器概要

  构造器
  构造器
  说明
  `InventoryOpenEvent(@NotNull InventoryView transaction)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `static @NotNull HandlerList`
  `getHandlerList()`
  `@NotNull HandlerList`
  `getHandlers()`
  `final @NotNull HumanEntity`
  `getPlayer()`
  返回涉及此事件的玩家.
  `boolean`
  `isCancelled()`
  获取此事件的取消状态.
  `void`
  `setCancelled(boolean cancel)`
  设置此事件的取消状态.

  ### 从类继承的方法 org.bukkit.event.inventory.InventoryEvent

  `getInventory, getView, getViewers`

  ### 从类继承的方法 org.bukkit.event.Event

  `getEventName, isAsynchronous`

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

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

- ## 构造器详细资料

  - ### InventoryOpenEvent

    public InventoryOpenEvent(@NotNull @NotNull InventoryView transaction)

- ## 方法详细资料

  - ### getPlayer

    @NotNull public final @NotNull HumanEntity getPlayer()
    返回涉及此事件的玩家.

    原文:Returns the player involved in this event

    返回:
      涉及此事件的玩家

  - ### isCancelled

    public boolean isCancelled()
    获取此事件的取消状态. 一个取消的事件将不会在服务器上执行，但将仍然传递给其他插件.

    如果一个物品栏打开事件被取消，物品栏界面将不会显示.

    原文:Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

    If an inventory open event is cancelled, the inventory screen will not show.

    指定者:
      `isCancelled` 在接口中 `Cancellable`
    返回:
      事件取消状态

  - ### setCancelled

    public void setCancelled(boolean cancel)
    设置此事件的取消状态. 一个取消的事件将不会在服务器上执行，但将仍然传递给其他插件.

    如果一个物品栏打开事件被取消，物品栏界面将不会显示.

    原文:Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

    If an inventory open event is cancelled, the inventory screen will not show.

    指定者:
      `setCancelled` 在接口中 `Cancellable`
    参数:
      `cancel` - 事件取消状态

  - ### getHandlers

    @NotNull public @NotNull HandlerList getHandlers()
    覆盖:
      `getHandlers` 在类中 `InventoryEvent`

  - ### getHandlerList

    @NotNull public static @NotNull HandlerList getHandlerList()