diff options
author | md_5 <git@md-5.net> | 2016-03-01 08:32:46 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 09:32:45 +1100 |
commit | aa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch) | |
tree | cb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/LoginListener.patch | |
parent | e1ebe524a78e27f6a2829ed4574fded3779094e1 (diff) | |
download | craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.gz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.lz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.xz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.zip |
Update to Minecraft 1.9
Diffstat (limited to 'nms-patches/LoginListener.patch')
-rw-r--r-- | nms-patches/LoginListener.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nms-patches/LoginListener.patch b/nms-patches/LoginListener.patch index e44493cf..8daab679 100644 --- a/nms-patches/LoginListener.patch +++ b/nms-patches/LoginListener.patch @@ -10,7 +10,7 @@ +import org.bukkit.event.player.PlayerPreLoginEvent; +// CraftBukkit end + - public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBox { + public class LoginListener implements PacketLoginInListener, ITickable { private static final AtomicInteger b = new AtomicInteger(0); @@ -32,6 +38,7 @@ @@ -36,9 +36,9 @@ + // CraftBukkit end } else { this.g = LoginListener.EnumProtocolState.ACCEPTED; - if (this.server.aK() >= 0 && !this.networkManager.c()) { + if (this.server.aF() >= 0 && !this.networkManager.isLocal()) { @@ -90,7 +99,7 @@ - LoginListener.this.networkManager.a(LoginListener.this.server.aK()); + LoginListener.this.networkManager.setCompressionLevel(LoginListener.this.server.aF()); } - public void operationComplete(Future future) throws Exception { @@ -49,7 +49,7 @@ @@ -101,9 +110,9 @@ if (entityplayer != null) { - this.g = LoginListener.EnumProtocolState.e; + this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT; - this.l = this.server.getPlayerList().processLogin(this.i); + this.l = this.server.getPlayerList().processLogin(this.i, s); // CraftBukkit - add player reference } else { @@ -60,10 +60,10 @@ @@ -148,6 +157,43 @@ - LoginListener.this.i = LoginListener.this.server.aD().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s); + LoginListener.this.i = LoginListener.this.server.ay().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s); if (LoginListener.this.i != null) { + // CraftBukkit start - fire PlayerPreLoginEvent -+ if (!networkManager.g()) { ++ if (!networkManager.isConnected()) { + return; + } + @@ -101,7 +101,7 @@ + // CraftBukkit end LoginListener.c.info("UUID of player " + LoginListener.this.i.getName() + " is " + LoginListener.this.i.getId()); LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; - } else if (LoginListener.this.server.T()) { + } else if (LoginListener.this.server.R()) { @@ -156,7 +202,7 @@ LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; } else { @@ -110,7 +110,7 @@ + LoginListener.c.error("Username \'" + gameprofile.getName() + "\' tried to join with an invalid session"); // CraftBukkit - fix null pointer } } catch (AuthenticationUnavailableException authenticationunavailableexception) { - if (LoginListener.this.server.T()) { + if (LoginListener.this.server.R()) { @@ -167,6 +213,11 @@ LoginListener.this.disconnect("Authentication servers are down. Please try again later, sorry!"); LoginListener.c.error("Couldn\'t verify username because servers are unavailable"); |