mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 16:12:18 -07:00
Update to Minecraft 1.9
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user