diff options
Diffstat (limited to 'nms-patches/HandshakeListener.patch')
-rw-r--r-- | nms-patches/HandshakeListener.patch | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/nms-patches/HandshakeListener.patch b/nms-patches/HandshakeListener.patch index f3340f59..4798ca8a 100644 --- a/nms-patches/HandshakeListener.patch +++ b/nms-patches/HandshakeListener.patch @@ -18,10 +18,17 @@ private final MinecraftServer a; private final NetworkManager b; -@@ -16,6 +26,41 @@ +@@ -11,12 +21,48 @@ + } + + public void a(PacketHandshakingInSetProtocol packethandshakinginsetprotocol) { ++ this.b.channel.pipeline().get(PacketEncoder.class).version = packethandshakinginsetprotocol.b(); // CraftBukkit + switch (HandshakeListener.SyntheticClass_1.a[packethandshakinginsetprotocol.a().ordinal()]) { + case 1: this.b.setProtocol(EnumProtocol.LOGIN); ChatComponentText chatcomponenttext; +- if (packethandshakinginsetprotocol.b() > 107) { + // CraftBukkit start - Connection throttle + try { + long currentTime = System.currentTimeMillis(); @@ -57,10 +64,11 @@ + } + // CraftBukkit end + - if (packethandshakinginsetprotocol.b() > 107) { ++ if (packethandshakinginsetprotocol.b() > 108) { chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.9"); this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext)); -@@ -26,6 +71,7 @@ + this.b.close(chatcomponenttext); +@@ -26,6 +72,7 @@ this.b.close(chatcomponenttext); } else { this.b.setPacketListener(new LoginListener(this.a, this.b)); |