ItemEquipEvent

The Item Equip Event is an event called when items in the mainhand or offhand of a player is placed into the mainhand or offhand.

Description
The ItemEquipEvent is a modified version of the ArmorEquipEvent class authored by Arnah in 2015 to help with finding when a player's armor changes. EnchantmentSolution modifies the class slightly, but it still uses the same foundation. It comes with a hand method, an item slot type, and two itemstacks that track the old armor piece and new armor piece.

The HandMethod comes with a bunch of types: These help keep track of the different ways players can equip items.
 * HELD_SWITCH
 * CRAFTED
 * PICK_UP
 * DROP
 * HOT_BAR
 * HELD_SWAP
 * BROKE
 * DEATH
 * JOIN

Constructor
ItemEquipEvent(final Player player, final HandMethod equipType, final ItemSlotType slot, final ItemStack oldItem, final ItemStack newItem)
 * // Player player - the player equipping/unequipping the armor
 * // HandMethod equipType - the method the item was equipped
 * // ItemSlotType type - the slot to which the item is being equipped (MAIN_HAND, OFF_HAND, HELMET, CHESTPLATE, LEGGINGS, BOOTS)
 * // ItemStack oldItem - the item being unequipped
 * // ItemStack newItem - the item being equipped

Implements
Cancellable

Extends
PlayerEvent

ItemSlotType getType
Returns the ItemSlotType of this event.

ItemStack getOldItem
Gets the old item (the item being unequipped)

ItemStack getNewItem
Gets the new item (the item being equipped)

HandMethod getMethod
Gets the HandMethod used to equip and/or unequip items.