Added pre-login event for catching logins right after name verification has completed. This happens in a different thread from the server (and thus can also block).

This commit is contained in:
sk89q
2011-04-16 03:08:13 -07:00
parent dc6c906e1a
commit 8aa376fc27
3 changed files with 59 additions and 2 deletions

View File

@@ -21,6 +21,12 @@ public class NetLoginHandler extends NetHandler {
this.b = new NetworkManager(socket, s, this);
this.b.d = 0;
}
// CraftBukkit start
public Socket getSocket() {
return b.f;
}
// CraftBukkit end
public void a() {
if (this.h != null) {
@@ -67,7 +73,7 @@ public class NetLoginHandler extends NetHandler {
if (!this.e.l) {
this.b(packet1login);
} else {
(new ThreadLoginVerifier(this, packet1login)).start();
(new ThreadLoginVerifier(this, packet1login, e.server)).start();
}
}
}