diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java index 9bf70e0403..b781583c23 100644 --- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java +++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java @@ -36,6 +36,10 @@ class ThreadLoginVerifier extends Thread { bufferedreader.close(); if (s1.equals("YES")) { // CraftBukkit start + if (this.netLoginHandler.getSocket() == null) { + return; + } + PlayerPreLoginEvent event = new PlayerPreLoginEvent(this.loginPacket.name, this.netLoginHandler.getSocket().getInetAddress()); server.getPluginManager().callEvent(event);