Document ServerPreConnectEvent more carefully.
This commit is contained in:
@@ -30,6 +30,10 @@ public final class ServerPreConnectEvent implements
|
|||||||
this.result = ServerResult.allowed(originalServer);
|
this.result = ServerResult.allowed(originalServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the player connecting to the server.
|
||||||
|
* @return the player connecting to the server
|
||||||
|
*/
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
@@ -44,6 +48,12 @@ public final class ServerPreConnectEvent implements
|
|||||||
this.result = Preconditions.checkNotNull(result, "result");
|
this.result = Preconditions.checkNotNull(result, "result");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the server that the player originally tried to connect to. To get the server the
|
||||||
|
* player will connect to, see the {@link ServerResult} of this event. To get the server the
|
||||||
|
* player is currently on when this event is fired, use {@link Player#getCurrentServer()}.
|
||||||
|
* @return the server that the player originally tried to connect to
|
||||||
|
*/
|
||||||
public RegisteredServer getOriginalServer() {
|
public RegisteredServer getOriginalServer() {
|
||||||
return originalServer;
|
return originalServer;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user