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;
|
|
|
|
|
2019-08-18 14:27:00 +02:00
|
|
|
import de.epiceric.shopchest.api.player.ShopPlayer;
|
|
|
|
|
2019-08-13 18:11:11 +02:00
|
|
|
/**
|
2019-08-13 20:59:56 +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();
|
|
|
|
|
2019-08-18 14:27:00 +02:00
|
|
|
private ShopPlayer player;
|
2019-08-13 18:11:11 +02:00
|
|
|
private boolean cancelled;
|
|
|
|
|
2019-08-18 14:27:00 +02:00
|
|
|
public ShopPreInfoEvent(ShopPlayer player) {
|
2019-08-13 18:11:11 +02:00
|
|
|
this.player = player;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-08-13 20:59:56 +02:00
|
|
|
* 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
|
|
|
*/
|
2019-08-18 14:27:00 +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;
|
|
|
|
}
|
|
|
|
}
|