Package org.bukkit.event.player

# Class PlayerArmorStandManipulateEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerInteractEntityEvent
org.bukkit.event.player.PlayerArmorStandManipulateEvent

All Implemented Interfaces:
  `Cancellable`

public class PlayerArmorStandManipulateEvent extends PlayerInteractEntityEvent
Called when a player interacts with an armor stand and will either swap, retrieve or place an item.

## 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

`clickedEntity`

### Fields inherited from class org.bukkit.event.player.PlayerEvent

`player`

## Constructor Summary

Constructors
Constructor
Description
`PlayerArmorStandManipulateEvent(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot)`
Deprecated.
`PlayerArmorStandManipulateEvent(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot, @NotNull EquipmentSlot hand)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull ItemStack`
`getArmorStandItem()`
Returns the item held by the armor stand.
`@NotNull EquipmentSlot`
`getHand()`
The hand used to perform this interaction.
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@NotNull ItemStack`
`getPlayerItem()`
Returns the item held by the player.
`@NotNull ArmorStand`
`getRightClicked()`
Gets the entity that was right-clicked by the player.
`@NotNull EquipmentSlot`
`getSlot()`
Returns the raw item slot of the armor stand in this event.

### Methods inherited from class org.bukkit.event.player.PlayerInteractEntityEvent

`isCancelled, setCancelled`

### Methods inherited from class org.bukkit.event.player.PlayerEvent

`getPlayer`

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PlayerArmorStandManipulateEvent

public PlayerArmorStandManipulateEvent(@NotNull @NotNull Player who, @NotNull @NotNull ArmorStand clickedEntity, @NotNull @NotNull ItemStack playerItem, @NotNull @NotNull ItemStack armorStandItem, @NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull EquipmentSlot hand)

### PlayerArmorStandManipulateEvent

@Deprecated public PlayerArmorStandManipulateEvent(@NotNull @NotNull Player who, @NotNull @NotNull ArmorStand clickedEntity, @NotNull @NotNull ItemStack playerItem, @NotNull @NotNull ItemStack armorStandItem, @NotNull @NotNull EquipmentSlot slot)
Deprecated.

## Method Details

### 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.

Returns:
  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.

Returns:
  the item held by the armor stand.

### getSlot

@NotNull public @NotNull EquipmentSlot 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.

### 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.

Overrides:
  `getHand` in class `PlayerInteractEntityEvent`
Returns:
  the hand used to interact

### getRightClicked

@NotNull public @NotNull ArmorStand getRightClicked()
Description copied from class: `PlayerInteractEntityEvent`
Gets the entity that was right-clicked by the player.

Overrides:
  `getRightClicked` in class `PlayerInteractEntityEvent`
Returns:
  entity right clicked by player

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Overrides:
  `getHandlers` in class `PlayerInteractEntityEvent`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()