ShopChest/api/src/main/java/de/epiceric/shopchest/api/event/ShopPreInfoEvent.java

53 lines
1.1 KiB
Java
Raw Normal View History

2019-08-13 18:11:11 +02:00
package de.epiceric.shopchest.api.event;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import de.epiceric.shopchest.api.player.ShopPlayer;
2019-08-13 18:11:11 +02:00
/**
* Called when a player enters the command to retrieve information about a shop
*
2022-08-21 19:19:09 +02:00
* @since 2.0
2019-08-13 18:11:11 +02:00
*/
public class ShopPreInfoEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private ShopPlayer player;
2019-08-13 18:11:11 +02:00
private boolean cancelled;
public ShopPreInfoEvent(ShopPlayer player) {
2019-08-13 18:11:11 +02:00
this.player = player;
}
/**
* Gets the player who is involved in this event
*
* @return the player
2022-08-21 19:19:09 +02:00
* @since 2.0
2019-08-13 18:11:11 +02:00
*/
public ShopPlayer getPlayer() {
2019-08-13 18:11:11 +02:00
return player;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}