SHARE
TWEET

ArmorEquip

a guest Oct 12th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class ArmorEquipEvent extends Event implements Cancellable
  2. {
  3.     private final Player p;
  4.     private final EquipmentSlot slot;
  5.     private final ItemStack item;
  6.     public ArmorEquipEvent(final Player p, final ItemStack item, final EquipmentSlot slot)
  7.     {
  8.         this.p=p;
  9.         this.slot=slot;
  10.         this.item=item;
  11.     }
  12.    
  13.     public Player getPlayer()
  14.     {
  15.         return p;
  16.     }
  17.    
  18.     public ItemStack getItem()
  19.     {
  20.         return item;
  21.     }
  22.    
  23.     public EquipmentSlot getSlot()
  24.     {
  25.         return slot;
  26.     }
  27.    
  28.     private static final HandlerList handler=new HandlerList();
  29.     @Override
  30.     public HandlerList getHandlers()
  31.     {
  32.         return handler;
  33.     }
  34.    
  35.     public static HandlerList getHandlerList()
  36.     {
  37.         return handler;
  38.     }
  39.    
  40.     private boolean cancelled=false;
  41.     @Override
  42.     public boolean isCancelled()
  43.     {
  44.         return cancelled;
  45.     }
  46.  
  47.     @Override
  48.     public void setCancelled(boolean bln)
  49.     {
  50.         cancelled=bln;
  51.     }
  52. }
RAW Paste Data
Top