summaryrefslogtreecommitdiffstats
path: root/nms-patches/LoginListener.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/LoginListener.patch')
-rw-r--r--nms-patches/LoginListener.patch20
1 files changed, 10 insertions, 10 deletions
diff --git a/nms-patches/LoginListener.patch b/nms-patches/LoginListener.patch
index ae5fb655..ceee1d4e 100644
--- a/nms-patches/LoginListener.patch
+++ b/nms-patches/LoginListener.patch
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/LoginListener.java
+++ b/net/minecraft/server/LoginListener.java
-@@ -18,6 +18,12 @@
+@@ -22,6 +22,12 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -13,7 +13,7 @@
public class LoginListener implements PacketLoginInListener, ITickable {
private static final AtomicInteger b = new AtomicInteger(0);
-@@ -32,6 +38,7 @@
+@@ -36,6 +42,7 @@
private final String j;
private SecretKey loginKey;
private EntityPlayer l;
@@ -21,7 +21,7 @@
public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) {
this.g = LoginListener.EnumProtocolState.HELLO;
-@@ -78,10 +85,12 @@
+@@ -82,10 +89,12 @@
this.i = this.a(this.i);
}
@@ -36,9 +36,9 @@
+ // CraftBukkit end
} else {
this.g = LoginListener.EnumProtocolState.ACCEPTED;
- if (this.server.aF() >= 0 && !this.networkManager.isLocal()) {
-@@ -90,7 +99,7 @@
- LoginListener.this.networkManager.setCompressionLevel(LoginListener.this.server.aF());
+ if (this.server.aG() >= 0 && !this.networkManager.isLocal()) {
+@@ -94,7 +103,7 @@
+ LoginListener.this.networkManager.setCompressionLevel(LoginListener.this.server.aG());
}
- public void operationComplete(Future future) throws Exception {
@@ -46,7 +46,7 @@
this.a((ChannelFuture) future);
}
}, new GenericFutureListener[0]);
-@@ -101,9 +110,9 @@
+@@ -105,9 +114,9 @@
if (entityplayer != null) {
this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT;
@@ -58,9 +58,9 @@
}
}
-@@ -148,6 +157,43 @@
+@@ -152,6 +161,43 @@
- LoginListener.this.i = LoginListener.this.server.ay().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s);
+ LoginListener.this.i = LoginListener.this.server.az().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s, this.a());
if (LoginListener.this.i != null) {
+ // CraftBukkit start - fire PlayerPreLoginEvent
+ if (!networkManager.isConnected()) {
@@ -102,7 +102,7 @@
LoginListener.c.info("UUID of player {} is {}", new Object[] { LoginListener.this.i.getName(), LoginListener.this.i.getId()});
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
} else if (LoginListener.this.server.R()) {
-@@ -167,6 +213,11 @@
+@@ -171,6 +217,11 @@
LoginListener.this.disconnect("Authentication servers are down. Please try again later, sorry!");
LoginListener.c.error("Couldn\'t verify username because servers are unavailable");
}