类 PlayerArmorStandManipulateEvent
- 所有已实现的接口:
Cancellable
原文: Called when a player interacts with an armor stand and will either swap, retrieve or place an item.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result
-
字段概要
从类继承的字段 org.bukkit.event.player.PlayerInteractEntityEvent
clickedEntity
从类继承的字段 org.bukkit.event.player.PlayerEvent
player
-
构造器概要
构造器说明PlayerArmorStandManipulateEvent
(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot) 已过时。PlayerArmorStandManipulateEvent
(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot, @NotNull EquipmentSlot hand) -
方法概要
修饰符和类型方法说明返回盔甲架的物品.getHand()
用于执行这次交互的手.static @NotNull HandlerList
返回玩家手持的物品.获取被玩家点击的实体.getSlot()
返回在此事件中盔甲架的装备槽.从类继承的方法 org.bukkit.event.player.PlayerInteractEntityEvent
isCancelled, setCancelled
从类继承的方法 org.bukkit.event.player.PlayerEvent
getPlayer
从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
PlayerArmorStandManipulateEvent
-
PlayerArmorStandManipulateEvent
@Deprecated public PlayerArmorStandManipulateEvent(@NotNull @NotNull Player who, @NotNull @NotNull ArmorStand clickedEntity, @NotNull @NotNull ItemStack playerItem, @NotNull @NotNull ItemStack armorStandItem, @NotNull @NotNull EquipmentSlot slot) 已过时。
-
-
方法详细资料
-
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
返回盔甲架的物品.- 如果玩家手持的物品为空时, 并且盔甲架的物品也为空时, 那么则玩家和盔甲架之间将不会有物品交换.
- 如果玩家手持的物品为空时,但是盔甲架的物品不为空时,那么玩家将获得盔甲架的物品.
- 如果玩家手持的物品不为空时,但盔甲架的物品为空时,则玩家物品将被放在盔甲架上.
- 如果玩家手持的物品不为空时,盔甲架的物品也不为空时,则玩家物品将和盔甲架的物品将进行交换.
- 如果该事件被取消, 那么交换将不会进行, 即物品不会进行交换.
原文: 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
返回在此事件中盔甲架的装备槽.原文: Returns the raw item slot of the armor stand in this event.
- 返回:
- 获得或放置盔甲架的物品的下标.
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
从类复制的说明:PlayerInteractEntityEvent
获取被玩家点击的实体.原文:Gets the entity that was rightclicked by the player.
- 覆盖:
getRightClicked
在类中PlayerInteractEntityEvent
- 返回:
- 被玩家点击的实体
-
getHandlers
- 覆盖:
getHandlers
在类中PlayerInteractEntityEvent
-
getHandlerList
-