类 PlayerArmorStandManipulateEvent

所有已实现的接口:
Cancellable

public class PlayerArmorStandManipulateEvent extends PlayerInteractEntityEvent
当玩家与装甲架交互并且进行交换, 取回或放置物品时触发本事件.

原文: Called when a player interacts with an armor stand and will either swap, retrieve or place an item.

  • 构造器详细资料

  • 方法详细资料

    • getPlayerItem

      @NotNull public @NotNull ItemStack getPlayerItem()
      返回玩家手持的物品.
      • 如果玩家手持的物品为空时, 并且盔甲架的物品也为空时, 那么则玩家和盔甲架之间将不会有物品交换.
      • 如果玩家手持的物品为空时,但是盔甲架的物品不为空时,那么玩家将获得盔甲架的物品.
      • 如果玩家手持的物品不为空时,但盔甲架的物品为空时,则玩家物品将被放在盔甲架上.
      • 如果玩家手持的物品不为空时,盔甲架的物品也不为空时,则玩家物品将和盔甲架的物品将进行交换.
      • 如果该事件被取消, 那么交换将不会进行, 即物品不会进行交换.

      原文: Returns the item held by the player.

      If this item is empty and the armor stand item is also empty, there will be no transaction between the player and the armor stand. If the player's item is empty but the armor stand item is not, the player's item will be placed on the armor stand. If both items are not empty, the items will be swapped.

      In the case that this event is cancelled, the original items will remain the same.

      返回:
      the item held by the player.
    • getArmorStandItem

      @NotNull public @NotNull ItemStack getArmorStandItem()
      返回盔甲架的物品.
      • 如果玩家手持的物品为空时, 并且盔甲架的物品也为空时, 那么则玩家和盔甲架之间将不会有物品交换.
      • 如果玩家手持的物品为空时,但是盔甲架的物品不为空时,那么玩家将获得盔甲架的物品.
      • 如果玩家手持的物品不为空时,但盔甲架的物品为空时,则玩家物品将被放在盔甲架上.
      • 如果玩家手持的物品不为空时,盔甲架的物品也不为空时,则玩家物品将和盔甲架的物品将进行交换.
      • 如果该事件被取消, 那么交换将不会进行, 即物品不会进行交换.

      原文: Returns the item held by the armor stand.

      If this item is empty and the player's item is also empty, there will be no transaction between the player and the armor stand. If the player's item is empty but the armor stand item is not, then the player will obtain the armor stand item. In the case that the player's item is not empty but the armor stand item is empty, the player's item will be placed on the armor stand. If both items are not empty, the items will be swapped.

      In the case that the event is cancelled the original items will remain the same.

      返回:
      盔甲架的的物品 ItemStack
    • getSlot

      @NotNull public @NotNull EquipmentSlot getSlot()
      返回在此事件中盔甲架的装备槽.

      原文: Returns the raw item slot of the armor stand in this event.

      返回:
      获得或放置盔甲架的物品的下标. EquipmentSlot
    • getHand

      @NotNull public @NotNull EquipmentSlot getHand()
      用于执行这次交互的手.

      原文:The hand used to perform this interaction.

      Note that this is not the hand of the armor stand that was changed, but rather the hand used by the player to swap items with the armor stand.

      覆盖:
      getHand 在类中 PlayerInteractEntityEvent
      返回:
      用来交互的手
    • getRightClicked

      @NotNull public @NotNull ArmorStand getRightClicked()
      从类复制的说明: PlayerInteractEntityEvent
      获取被玩家点击的实体.

      原文:Gets the entity that was rightclicked by the player.

      覆盖:
      getRightClicked 在类中 PlayerInteractEntityEvent
      返回:
      被玩家点击的实体
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      覆盖:
      getHandlers 在类中 PlayerInteractEntityEvent
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()