Update to Minecraft 1.9

This commit is contained in:
md_5
2016-03-01 08:32:46 +11:00
parent e1ebe524a7
commit aa008dff0f
305 changed files with 6684 additions and 6105 deletions

View File

@@ -19,7 +19,7 @@
private final NetworkManager b;
@@ -16,6 +26,41 @@
this.b.a(EnumProtocol.LOGIN);
this.b.setProtocol(EnumProtocol.LOGIN);
ChatComponentText chatcomponenttext;
+ // CraftBukkit start - Connection throttle
@@ -32,7 +32,7 @@
+ if (throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - throttleTracker.get(address) < connectionThrottle) {
+ throttleTracker.put(address, currentTime);
+ chatcomponenttext = new ChatComponentText("Connection throttled! Please wait before reconnecting.");
+ this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
+ this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext));
+ this.b.close(chatcomponenttext);
+ return;
+ }
@@ -57,14 +57,14 @@
+ }
+ // CraftBukkit end
+
if (packethandshakinginsetprotocol.b() > 47) {
chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.8");
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
if (packethandshakinginsetprotocol.b() > 107) {
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);
} else {
this.b.a((PacketListener) (new LoginListener(this.a, this.b)));
+ ((LoginListener) this.b.getPacketListener()).hostname = packethandshakinginsetprotocol.hostname + ":" + packethandshakinginsetprotocol.port; // CraftBukkit - set hostname
this.b.setPacketListener(new LoginListener(this.a, this.b));
+ ((LoginListener) this.b.i()).hostname = packethandshakinginsetprotocol.hostname + ":" + packethandshakinginsetprotocol.port; // CraftBukkit - set hostname
}
break;