Class ItemFrameUseEvent

All Implemented Interfaces:
Cancellable
Direct Known Subclasses:
ItemFrameDropItemEvent

@PowerNukkitXOnly @Since("1.19.62-r1") public class ItemFrameUseEvent extends BlockEvent implements Cancellable
物品展示框被使用的事件,会在放置物品,旋转物品,掉落物品时调用

The event that the item display box is used will be called when an item is placed, rotated, or dropped

  • Field Details

  • Constructor Details

  • Method Details

    • getHandlers

      public static HandlerList getHandlers()
    • getPlayer

      @Nullable public Player getPlayer()
      获取使用物品展示框的玩家 Gets player.
      Returns:
      the player
    • getItemFrame

      @NotNull public BlockEntityItemFrame getItemFrame()
      获取被使用的物品展示框

      Gets item frame.

      Returns:
      the item frame
    • getItem

      @Nullable public Item getItem()
      获取操作中的物品,例如放置物品到物品展示框,获取该物品

      Get the item in action, e.g. place the item in the item display box and get the item

      Returns:
      the item
    • getAction

      @NotNull public ItemFrameUseEvent.Action getAction()
      获取操作类型,掉落,放置,选择

      Get operation type, drop, place, select

      Returns:
      the action