GangShopPurchaseEvent
/**
* Represents an event that is fired when an item is purchased from the gang shop.
*
* Cancellable = true
*
* @author frxq
* @since 1.0.0
*/
public class GangShopPurchaseEvent extends Event implements Cancellable {
private final GangsX plugin;
private final Player player;
private final Gang gang;
private final ItemStack item;
private boolean cancelled;
private final List<String> commands;
private final String currency;
private static final HandlerList handlers = new HandlerList();
private final int cost;
public GangShopPurchaseEvent(GangsX plugin, Player player, Gang gang, String currency, List<String> commands, ItemStack item, int cost) {
this.plugin = plugin;
this.player = player;
this.gang = gang;
this.currency = currency;
this.commands = commands;
this.item = item;
this.cost = cost;
}
@Override
public @NotNull HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
@NotNull
public Player getPlayer() {
return player;
}
public Integer getCost() { return cost; }
public boolean isCancelled() {
return cancelled;
}
public String getCurrency() { return currency; }
public ItemStack getPurchasedItem() {
return item;
}
public void setCancelled(boolean cancel) {
cancelled = cancel;
}
public List<String> getCommands() { return commands; }
@NotNull
public Gang getGang() {
return gang;
}
}
Last updated