diff options
author | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2014-03-20 22:26:30 -0600 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2014-03-21 23:56:34 -0400 |
commit | 385ace970ee7b7912419d601b8a0867c4c2794df (patch) | |
tree | 2549da069930b488940f8a99833c396ffc7e36d1 /src/main/java/net/minecraft/server/HandshakeListener.java | |
parent | afb3511a4a5a63007217f2dbbbbc753f3bee0aed (diff) | |
download | craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.gz craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.lz craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.xz craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.zip |
Update CraftBukkit to Minecraft 1.7.5
Diffstat (limited to 'src/main/java/net/minecraft/server/HandshakeListener.java')
-rw-r--r-- | src/main/java/net/minecraft/server/HandshakeListener.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java index 54ecbdfa..e5992f85 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -9,7 +9,7 @@ import java.util.HashMap; public class HandshakeListener implements PacketHandshakingInListener { - // CraftBukkit start + // CraftBukkit start - add fields private static final HashMap<InetAddress, Long> throttleTracker = new HashMap<InetAddress, Long>(); private static int throttleCounter = 0; // CraftBukkit end @@ -28,7 +28,7 @@ public class HandshakeListener implements PacketHandshakingInListener { this.b.a(EnumProtocol.LOGIN); ChatComponentText chatcomponenttext; - // CraftBukkit start + // CraftBukkit start - Connection throttle try { long currentTime = System.currentTimeMillis(); long connectionThrottle = MinecraftServer.getServer().server.getConnectionThrottle(); @@ -39,7 +39,7 @@ public class HandshakeListener implements PacketHandshakingInListener { throttleTracker.put(address, currentTime); chatcomponenttext = new ChatComponentText("Connection throttled! Please wait before reconnecting."); this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]); - this.b.a(chatcomponenttext); // Should be close + this.b.close(chatcomponenttext); return; } @@ -64,13 +64,13 @@ public class HandshakeListener implements PacketHandshakingInListener { // CraftBukkit end if (packethandshakinginsetprotocol.d() > 4) { - chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.2"); + chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.5"); this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]); - this.b.a((IChatBaseComponent) chatcomponenttext); + this.b.close(chatcomponenttext); } else if (packethandshakinginsetprotocol.d() < 4) { - chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.2"); + chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.5"); this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]); - this.b.a((IChatBaseComponent) chatcomponenttext); + this.b.close(chatcomponenttext); } else { this.b.a((PacketListener) (new LoginListener(this.a, this.b))); ((LoginListener) this.b.getPacketListener()).hostname = packethandshakinginsetprotocol.b + ":" + packethandshakinginsetprotocol.c; // CraftBukkit - set hostname |