2015-08-30 23:13:08 +02:00
|
|
|
package nautilus.game.arcade.events;
|
|
|
|
|
|
|
|
import nautilus.game.arcade.game.Game;
|
|
|
|
import nautilus.game.arcade.kit.Kit;
|
|
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.bukkit.event.Cancellable;
|
|
|
|
import org.bukkit.event.Event;
|
|
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
|
|
|
|
public class PlayerKitApplyEvent extends Event implements Cancellable
|
|
|
|
{
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
|
|
|
private Game _game;
|
|
|
|
private Kit _kit;
|
|
|
|
private Player _player;
|
|
|
|
private boolean _cancelled = false;
|
|
|
|
private String _cancelMessage = "";
|
|
|
|
|
|
|
|
public PlayerKitApplyEvent(Game game, Kit kit, Player player)
|
|
|
|
{
|
|
|
|
_game = game;
|
|
|
|
_kit = kit;
|
|
|
|
_player = player;
|
|
|
|
}
|
|
|
|
|
|
|
|
public HandlerList getHandlers()
|
|
|
|
{
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static HandlerList getHandlerList()
|
|
|
|
{
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
|
2015-10-27 06:38:41 +01:00
|
|
|
public Game getGame()
|
2015-08-30 23:13:08 +02:00
|
|
|
{
|
|
|
|
return _game;
|
|
|
|
}
|
|
|
|
|
2015-10-27 06:38:41 +01:00
|
|
|
public Kit getKit()
|
2015-08-30 23:13:08 +02:00
|
|
|
{
|
|
|
|
return _kit;
|
|
|
|
}
|
|
|
|
|
2015-10-27 06:38:41 +01:00
|
|
|
public Player getPlayer()
|
2015-08-30 23:13:08 +02:00
|
|
|
{
|
|
|
|
return _player;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getCancelMessage()
|
|
|
|
{
|
|
|
|
return _cancelMessage;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setCancelMessage(String message)
|
|
|
|
{
|
|
|
|
_cancelMessage = message;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isCancelled()
|
|
|
|
{
|
|
|
|
return _cancelled;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setCancelled(boolean cancelled)
|
|
|
|
{
|
|
|
|
_cancelled = cancelled;
|
|
|
|
}
|
|
|
|
}
|