diff options
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/NetworkManager.java | 24 |
2 files changed, 18 insertions, 8 deletions
@@ -39,7 +39,7 @@ <dependency> <groupId>org.bukkit</groupId> <artifactId>minecraft-server</artifactId> - <version>1.6</version> + <version>1.6.4</version> <type>jar</type> <scope>compile</scope> </dependency> diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index f463aa58..f2bcbb72 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -82,7 +82,9 @@ public class NetworkManager { } } - private void f() { + private boolean f() { + boolean flag = false; + try { Object object; Packet packet; @@ -100,9 +102,9 @@ public class NetworkManager { aint = e; i = packet.b(); aint[i] += packet.a(); + flag = true; } - // Craftbukkit - we used to enforce package priorities, we don't now. Do we need to redo this? - TODO if (this.z-- <= 0 && !this.o.isEmpty() && (this.f == 0 || System.currentTimeMillis() - ((Packet) this.o.get(0)).timestamp >= (long) this.f)) { object = this.g; synchronized (this.g) { @@ -115,19 +117,24 @@ public class NetworkManager { i = packet.b(); aint[i] += packet.a(); this.z = 50; + flag = true; } } catch (Exception exception) { if (!this.t) { this.a(exception); } } + + return flag; } public void a() { this.y = true; } - private void g() { + private boolean g() { + boolean flag = false; + try { Packet packet = Packet.a(this.input, this.p.c()); @@ -137,6 +144,7 @@ public class NetworkManager { aint[i] += packet.a(); this.m.add(packet); + flag = true; } else { this.a("disconnect.endOfStream", new Object[0]); } @@ -145,6 +153,8 @@ public class NetworkManager { this.a(exception); } } + + return flag; } private void a(Exception exception) { @@ -232,12 +242,12 @@ public class NetworkManager { return networkmanager.q; } - static void c(NetworkManager networkmanager) { - networkmanager.g(); + static boolean c(NetworkManager networkmanager) { + return networkmanager.g(); } - static void d(NetworkManager networkmanager) { - networkmanager.f(); + static boolean d(NetworkManager networkmanager) { + return networkmanager.f(); } static boolean e(NetworkManager networkmanager) { |