public class ArmorEquipEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
ArmorEquipEventListener
Modifier and Type | Class and Description |
---|---|
static class |
ArmorEquipEvent.ArmorType
Represents for which slot armor was euipped.
|
static class |
ArmorEquipEvent.EquipMethod
Represents how armor was equipped.
|
Modifier and Type | Field and Description |
---|---|
private ArmorEquipEvent.ArmorType |
armorType
For which slot armor was euipped.
|
private boolean |
cancelled
If the event has been cancelled.
|
private ArmorEquipEvent.EquipMethod |
equipMethod
How the armor was equipped.
|
private static org.bukkit.event.HandlerList |
HANDLERS
A list of handlers for this event.
|
private org.bukkit.inventory.ItemStack |
newArmorPiece
The armor piece that is in the slot now.
|
private org.bukkit.inventory.ItemStack |
oldArmorPiece
The armor piece that was in the slot before.
|
Constructor and Description |
---|
ArmorEquipEvent(org.bukkit.entity.Player player,
ArmorEquipEvent.EquipMethod equipMethod,
ArmorEquipEvent.ArmorType armorType,
org.bukkit.inventory.ItemStack oldArmorPiece,
org.bukkit.inventory.ItemStack newArmorPiece)
Creates a new armor equip event with given values.
|
Modifier and Type | Method and Description |
---|---|
ArmorEquipEvent.ArmorType |
getArmorType() |
ArmorEquipEvent.EquipMethod |
getEquipMethod() |
static org.bukkit.event.HandlerList |
getHandlerList() |
org.bukkit.event.HandlerList |
getHandlers() |
org.bukkit.inventory.ItemStack |
getNewArmorPiece() |
org.bukkit.inventory.ItemStack |
getOldArmorPiece() |
boolean |
isCancelled() |
void |
setCancelled(boolean cancelled) |
void |
setNewArmorPiece(org.bukkit.inventory.ItemStack newArmorPiece) |
void |
setOldArmorPiece(org.bukkit.inventory.ItemStack oldArmorPiece) |
private static final org.bukkit.event.HandlerList HANDLERS
private boolean cancelled
private final ArmorEquipEvent.EquipMethod equipMethod
private final ArmorEquipEvent.ArmorType armorType
private org.bukkit.inventory.ItemStack oldArmorPiece
private org.bukkit.inventory.ItemStack newArmorPiece
public ArmorEquipEvent(org.bukkit.entity.Player player, ArmorEquipEvent.EquipMethod equipMethod, ArmorEquipEvent.ArmorType armorType, org.bukkit.inventory.ItemStack oldArmorPiece, org.bukkit.inventory.ItemStack newArmorPiece)
player
- The player that equipped the armor.equipMethod
- How the armor was equipped.armorType
- For which slot armor was euipped.oldArmorPiece
- The armor piece that was in the slot before.newArmorPiece
- The armor piece that is in the slot now.public static final org.bukkit.event.HandlerList getHandlerList()
public final org.bukkit.event.HandlerList getHandlers()
getHandlers
in class org.bukkit.event.Event
public final void setCancelled(boolean cancelled)
setCancelled
in interface org.bukkit.event.Cancellable
cancelled
- If the event has been cancelled now.public final boolean isCancelled()
isCancelled
in interface org.bukkit.event.Cancellable
public ArmorEquipEvent.EquipMethod getEquipMethod()
public final ArmorEquipEvent.ArmorType getArmorType()
public final org.bukkit.inventory.ItemStack getOldArmorPiece()
public final void setOldArmorPiece(org.bukkit.inventory.ItemStack oldArmorPiece)
oldArmorPiece
- The new armor piece that was in the slot before.public final org.bukkit.inventory.ItemStack getNewArmorPiece()
public final void setNewArmorPiece(org.bukkit.inventory.ItemStack newArmorPiece)
newArmorPiece
- The new armor piece that is in the slot now.