0ab3213b7b
- Fixed skills being active while player is editing class
74 lines
1.4 KiB
Java
74 lines
1.4 KiB
Java
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;
|
|
}
|
|
|
|
public Game getGame()
|
|
{
|
|
return _game;
|
|
}
|
|
|
|
public Kit getKit()
|
|
{
|
|
return _kit;
|
|
}
|
|
|
|
public Player getPlayer()
|
|
{
|
|
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;
|
|
}
|
|
}
|