3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00

Update for 1.6.4

Dieser Commit ist enthalten in:
Erik Broes 2011-05-26 16:20:11 +02:00
Ursprung dc76d3a64a
Commit 5e1c969af2
2 geänderte Dateien mit 18 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -39,7 +39,7 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>minecraft-server</artifactId> <artifactId>minecraft-server</artifactId>
<version>1.6</version> <version>1.6.4</version>
<type>jar</type> <type>jar</type>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

Datei anzeigen

@ -82,7 +82,9 @@ public class NetworkManager {
} }
} }
private void f() { private boolean f() {
boolean flag = false;
try { try {
Object object; Object object;
Packet packet; Packet packet;
@ -100,9 +102,9 @@ public class NetworkManager {
aint = e; aint = e;
i = packet.b(); i = packet.b();
aint[i] += packet.a(); 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)) { if (this.z-- <= 0 && !this.o.isEmpty() && (this.f == 0 || System.currentTimeMillis() - ((Packet) this.o.get(0)).timestamp >= (long) this.f)) {
object = this.g; object = this.g;
synchronized (this.g) { synchronized (this.g) {
@ -115,19 +117,24 @@ public class NetworkManager {
i = packet.b(); i = packet.b();
aint[i] += packet.a(); aint[i] += packet.a();
this.z = 50; this.z = 50;
flag = true;
} }
} catch (Exception exception) { } catch (Exception exception) {
if (!this.t) { if (!this.t) {
this.a(exception); this.a(exception);
} }
} }
return flag;
} }
public void a() { public void a() {
this.y = true; this.y = true;
} }
private void g() { private boolean g() {
boolean flag = false;
try { try {
Packet packet = Packet.a(this.input, this.p.c()); Packet packet = Packet.a(this.input, this.p.c());
@ -137,6 +144,7 @@ public class NetworkManager {
aint[i] += packet.a(); aint[i] += packet.a();
this.m.add(packet); this.m.add(packet);
flag = true;
} else { } else {
this.a("disconnect.endOfStream", new Object[0]); this.a("disconnect.endOfStream", new Object[0]);
} }
@ -145,6 +153,8 @@ public class NetworkManager {
this.a(exception); this.a(exception);
} }
} }
return flag;
} }
private void a(Exception exception) { private void a(Exception exception) {
@ -232,12 +242,12 @@ public class NetworkManager {
return networkmanager.q; return networkmanager.q;
} }
static void c(NetworkManager networkmanager) { static boolean c(NetworkManager networkmanager) {
networkmanager.g(); return networkmanager.g();
} }
static void d(NetworkManager networkmanager) { static boolean d(NetworkManager networkmanager) {
networkmanager.f(); return networkmanager.f();
} }
static boolean e(NetworkManager networkmanager) { static boolean e(NetworkManager networkmanager) {