Expose original server in ServerPreConnectEvent

This commit is contained in:
Andrew Steinborn
2018-09-15 01:16:26 -04:00
parent e9568e1b6c
commit 2b1d55a0fc
2 changed files with 10 additions and 3 deletions

View File

@@ -275,7 +275,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
}
// Otherwise, initiate the connection.
ServerPreConnectEvent event = new ServerPreConnectEvent(this, ServerPreConnectEvent.ServerResult.allowed(request.getServer()));
ServerPreConnectEvent event = new ServerPreConnectEvent(this, request.getServer());
return server.getEventManager().fire(event)
.thenCompose((newEvent) -> {
if (!newEvent.getResult().isAllowed()) {