Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.17 KB | None | 0 0
  1. public class ShopEvent extends Event {
  2.  
  3.     private static final HandlerList HANDLERS = new HandlerList();
  4.     private boolean isCancelled;
  5.  
  6.     private Player player;
  7.     private String shopName;
  8.     private ItemStack item;
  9.     private int price;
  10.     private int itemStock;
  11.     private boolean isShopDynamic;
  12.     private ShopAction shopAction;
  13.  
  14.     public ShopEvent(Player player, String shopName, ItemStack item, int price, int itemStock, boolean isShopDynamic, ShopAction shopAction){
  15.         setPlayer(player);
  16.         setShopName(shopName);
  17.         setItem(item);
  18.         setPrice(price);
  19.         setItemStock(itemStock);
  20.         setShopDynamic(isShopDynamic);
  21.         setCancelled(false);
  22.         setShopAction(shopAction);
  23.     }
  24.  
  25.     @Override
  26.     public HandlerList getHandlers() {
  27.         return HANDLERS;
  28.     }
  29.    
  30.     public static HandlerList getHandlerList() {
  31.         return HANDLERS;
  32.     }
  33.  
  34.     public boolean isCancelled() {
  35.         return this.isCancelled;
  36.     }
  37.  
  38.     public void setCancelled(boolean isCancelled) {
  39.         this.isCancelled = isCancelled;
  40.     }
  41.  
  42.     public Player getPlayer() {
  43.         return player;
  44.     }
  45.  
  46.     public void setPlayer(Player player) {
  47.         this.player = player;
  48.     }
  49.  
  50.     public String getShopName() {
  51.         return shopName;
  52.     }
  53.  
  54.     public void setShopName(String shopName) {
  55.         this.shopName = shopName;
  56.     }
  57.  
  58.     public ItemStack getItem() {
  59.         return item;
  60.     }
  61.  
  62.     public void setItem(ItemStack item) {
  63.         this.item = item;
  64.     }
  65.  
  66.     public int getPrice() {
  67.         return price;
  68.     }
  69.  
  70.     public void setPrice(int price) {
  71.         this.price = price;
  72.     }
  73.  
  74.     public int getItemStock() {
  75.         return itemStock;
  76.     }
  77.  
  78.     public void setItemStock(int itemStock) {
  79.         this.itemStock = itemStock;
  80.     }
  81.  
  82.     public boolean isShopDynamic() {
  83.         return isShopDynamic;
  84.     }
  85.  
  86.     public void setShopDynamic(boolean shopDynamic) {
  87.         isShopDynamic = shopDynamic;
  88.     }
  89.  
  90.     public ShopAction getShopAction() {
  91.         return shopAction;
  92.     }
  93.  
  94.     public void setShopAction(ShopAction shopAction) {
  95.         this.shopAction = shopAction;
  96.     }
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement