Add State to ServerKickEvent

This commit is contained in:
mrapple
2013-08-03 16:55:34 -05:00
committed by md_5
parent 14ac2dd308
commit ee8f33c196
3 changed files with 18 additions and 2 deletions

View File

@@ -33,11 +33,27 @@ public class ServerKickEvent extends Event implements Cancellable
* Server to send player to if this event is cancelled.
*/
private ServerInfo cancelServer;
/**
* State in which the kick occured.
*/
private State state;
public enum State
{
CONNECTING, CONNECTED, UNKNOWN;
}
public ServerKickEvent(ProxiedPlayer player, String kickReason, ServerInfo cancelServer)
{
this(player, kickReason, cancelServer, State.UNKNOWN);
}
public ServerKickEvent(ProxiedPlayer player, String kickReason, ServerInfo cancelServer, State state)
{
this.player = player;
this.kickReason = kickReason;
this.cancelServer = cancelServer;
this.state = state;
}
}