Skip to content

Instantly share code, notes, and snippets.

@brcdev
Created October 9, 2016 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brcdev/01e7a70653204eabbcb5235dffd1a9c6 to your computer and use it in GitHub Desktop.
Save brcdev/01e7a70653204eabbcb5235dffd1a9c6 to your computer and use it in GitHub Desktop.
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