Class ArmorEquipEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
studio.magemonkey.codex.api.armor.ArmorEquipEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ArmorEquipEvent extends org.bukkit.event.player.PlayerEvent implements org.bukkit.event.Cancellable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     

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

    org.bukkit.event.Event.Result
  • Field Summary

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

    player
  • Constructor Summary

    Constructors
    Constructor
    Description
    ArmorEquipEvent(org.bukkit.entity.Player player, ArmorEquipEvent.EquipMethod equipType, ArmorType type, org.bukkit.inventory.ItemStack oldArmorPiece, org.bukkit.inventory.ItemStack newArmorPiece)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Gets a list of handlers handling this event.
    final org.bukkit.event.HandlerList
    Gets a list of handlers handling this event.
    Gets the method used to either equip or unequip an armor piece.
    final org.bukkit.inventory.ItemStack
    Returns the newly equipped armor, could be a piece of armor, or null
    final org.bukkit.inventory.ItemStack
    Returns the last equipped armor piece, could be a piece of armor, or null
    final ArmorType
     
    final boolean
    Gets if this event is cancelled.
    final void
    setCancelled(boolean cancel)
    Sets if this event should be cancelled.
    final void
    setNewArmorPiece(org.bukkit.inventory.ItemStack newArmorPiece)
     
    final void
    setOldArmorPiece(org.bukkit.inventory.ItemStack oldArmorPiece)
     

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

    getPlayer

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ArmorEquipEvent

      public ArmorEquipEvent(org.bukkit.entity.Player player, ArmorEquipEvent.EquipMethod equipType, ArmorType type, org.bukkit.inventory.ItemStack oldArmorPiece, org.bukkit.inventory.ItemStack newArmorPiece)
      Parameters:
      player - The player who put on / removed the armor.
      type - The ArmorType of the armor added
      oldArmorPiece - The ItemStack of the armor removed.
      newArmorPiece - The ItemStack of the armor added.
  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Gets a list of handlers handling this event.
      Returns:
      A list of handlers handling this event.
    • getHandlers

      public final org.bukkit.event.HandlerList getHandlers()
      Gets a list of handlers handling this event.
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      A list of handlers handling this event.
    • setCancelled

      public final void setCancelled(boolean cancel)
      Sets if this event should be cancelled.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancel - If this event should be cancelled.
    • isCancelled

      public final boolean isCancelled()
      Gets if this event is cancelled.
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      If this event is cancelled
    • getType

      public final ArmorType getType()
    • getOldArmorPiece

      public final org.bukkit.inventory.ItemStack getOldArmorPiece()
      Returns the last equipped armor piece, could be a piece of armor, or null
    • setOldArmorPiece

      public final void setOldArmorPiece(org.bukkit.inventory.ItemStack oldArmorPiece)
    • getNewArmorPiece

      public final org.bukkit.inventory.ItemStack getNewArmorPiece()
      Returns the newly equipped armor, could be a piece of armor, or null
    • setNewArmorPiece

      public final void setNewArmorPiece(org.bukkit.inventory.ItemStack newArmorPiece)
    • getMethod

      public ArmorEquipEvent.EquipMethod getMethod()
      Gets the method used to either equip or unequip an armor piece.