Package com.destroystokyo.paper.event.player

# Class PlayerArmorChangeEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.player.PlayerArmorChangeEvent

public class PlayerArmorChangeEvent extends PlayerEvent
Called when the player themselves change their armor items

Not currently called for environmental factors though it MAY BE IN THE FUTURE

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`PlayerArmorChangeEvent.SlotType`

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Field Summary

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

`player`

## Constructor Summary

Constructors
Constructor
Description
`PlayerArmorChangeEvent(@NotNull Player player, @NotNull PlayerArmorChangeEvent.SlotType slotType, @Nullable ItemStack oldItem, @Nullable ItemStack newItem)`

## Method Summary

Modifier and Type
Method
Description
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@Nullable ItemStack`
`getNewItem()`
Gets the new item that's replacing the old
`@Nullable ItemStack`
`getOldItem()`
Gets the existing item that's being replaced
`@NotNull PlayerArmorChangeEvent.SlotType`
`getSlotType()`
Gets the type of slot being altered.
`String`
`toString()`

### 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, wait, wait, wait`

## Constructor Details

### PlayerArmorChangeEvent

public PlayerArmorChangeEvent(@NotNull @NotNull Player player, @NotNull @NotNull PlayerArmorChangeEvent.SlotType slotType, @Nullable @Nullable ItemStack oldItem, @Nullable @Nullable ItemStack newItem)

## Method Details

### getSlotType

@NotNull public @NotNull PlayerArmorChangeEvent.SlotType getSlotType()
Gets the type of slot being altered.

Returns:
  type of slot being altered

### getOldItem

@Nullable public @Nullable ItemStack getOldItem()
Gets the existing item that's being replaced

Returns:
  old item

### getNewItem

@Nullable public @Nullable ItemStack getNewItem()
Gets the new item that's replacing the old

Returns:
  new item

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()