# 类的使用
org.bukkit.event.inventory.InventoryEvent

使用InventoryEvent的程序包
程序包
说明
org.bukkit.event.enchantment
与`附魔台`操作相关的`事件`.
org.bukkit.event.inventory
与`物品栏`操作相关的`事件`.

- ## org.bukkit.event.enchantment中InventoryEvent的使用

  org.bukkit.event.enchantment中InventoryEvent的子类
  修饰符和类型
  类
  说明
  `class`
  `EnchantItemEvent`
  成功附魔物品的事件 (在附魔台里面附魔的)
  `class`
  `PrepareItemEnchantEvent`
  物品塞入附魔台的事件 - 可被多次调用。

- ## org.bukkit.event.inventory中InventoryEvent的使用

  org.bukkit.event.inventory中InventoryEvent的子类
  修饰符和类型
  类
  说明
  `class`
  `CraftItemEvent`
  当一个物品被合成的时候触发这个事件.
  `class`
  `InventoryClickEvent`
  当玩家点击物品栏中的格子时触发事件事件.
  译注：事实上打开任意容器的物品栏(包括玩家的背包)后点击任何一个地方都会触发这个事件。
  `class`
  `InventoryCloseEvent`
  当玩家关闭背包时触发本事件
  `class`
  `InventoryCreativeEvent`
  This event is called when a player in creative mode puts down or picks up an item in their inventory / hotbar and when they drop items from their Inventory while in creative mode.
  `class`
  `InventoryDragEvent`
  This event is called when the player drags an item in their cursor across the inventory.
  `class`
  `InventoryInteractEvent`
  An abstract base class for events that describe an interaction between a HumanEntity and the contents of an Inventory.
  `class`
  `InventoryOpenEvent`
  当玩家打开物品栏时触发本事件
  `class`
  `PrepareAnvilEvent`
  当物品放入铁砧内，并且可以合成出物品的时候触发该事件
  `class`
  `PrepareGrindstoneEvent`
  Called when an item is put in a slot for repair or unenchanting in a grindstone.
  `class`
  `PrepareInventoryResultEvent`
  Called when an item is put in a slot and the result is calculated.
  `class`
  `PrepareItemCraftEvent`
  `class`
  `PrepareSmithingEvent`
  Called when an item is put in a slot for upgrade by a Smithing Table.
  `class`
  `SmithItemEvent`
  Called when the recipe of an Item is completed inside a smithing table.
  `class`
  `TradeSelectEvent`
  This event is called whenever a player clicks a new trade on the trades sidebar.