Created
October 9, 2016 16:11
-
-
Save brcdev/01e7a70653204eabbcb5235dffd1a9c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.brcdev.shopgui.event; | |
import net.brcdev.shopgui.shop.ShopItem; | |
import net.brcdev.shopgui.shop.ShopManager.ShopAction; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.Cancellable; | |
import org.bukkit.event.Event; | |
import org.bukkit.event.HandlerList; | |
public class ShopTransactionEvent extends Event implements Cancellable { | |
private static final HandlerList handlers = new HandlerList(); | |
private boolean cancelled; | |
private ShopAction shopAction; | |
private ShopItem shopItem; | |
private Player player; | |
private int amount; | |
private double price; | |
public ShopTransactionEvent(ShopAction shopAction, ShopItem shopItem, Player player, int amount, double price) { | |
this.shopAction = shopAction; | |
this.shopItem = shopItem; | |
this.player = player; | |
this.amount = amount; | |
this.price = price; | |
} | |
@Override | |
public boolean isCancelled() { | |
return cancelled; | |
} | |
@Override | |
public void setCancelled(boolean cancel) { | |
cancelled = cancel; | |
} | |
@Override | |
public HandlerList getHandlers() { | |
return handlers; | |
} | |
public static HandlerList getHandlerList() { | |
return handlers; | |
} | |
public ShopItem getShopItem() { | |
return shopItem; | |
} | |
public ShopAction getShopAction() { | |
return shopAction; | |
} | |
public Player getPlayer() { | |
return player; | |
} | |
public int getAmount() { | |
return amount; | |
} | |
public void setAmount(int amount) { | |
this.amount = amount; | |
} | |
public double getPrice() { | |
return price; | |
} | |
public void setPrice(double price) { | |
this.price = price; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment