Class PlayerArmorStandManipulateEvent
- All Implemented Interfaces:
Cancellable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerInteractEntityEvent
clickedEntityFields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerArmorStandManipulateEvent(Player who, ArmorStand clickedEntity, ItemStack playerItem, ItemStack armorStandItem, EquipmentSlot slot) -
Method Summary
Modifier and TypeMethodDescriptionReturns the item held by the armor stand.static HandlerListReturns the item held by the player.Gets the entity that was right-clicked by the player.getSlot()Returns the raw item slot of the armor stand in this event.Methods inherited from class org.bukkit.event.player.PlayerInteractEntityEvent
getHand, isCancelled, setCancelledMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerArmorStandManipulateEvent
public PlayerArmorStandManipulateEvent(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot)
-
-
Method Details
-
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.
- Returns:
- 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.
- Returns:
- the item held by the armor stand.
-
getSlot
Returns the raw item slot of the armor stand in this event.- Returns:
- the index of the item obtained or placed of the armor stand.
-
getRightClicked
Description copied from class:PlayerInteractEntityEventGets the entity that was right-clicked by the player.- Overrides:
getRightClickedin classPlayerInteractEntityEvent- Returns:
- entity right clicked by player
-
getHandlers
- Overrides:
getHandlersin classPlayerInteractEntityEvent
-
getHandlerList
-