mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-26 18:03:51 -07:00
Update to Minecraft 1.12-pre6
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
@@ -16,6 +26,41 @@
|
||||
this.b.setProtocol(EnumProtocol.LOGIN);
|
||||
ChatComponentText chatcomponenttext;
|
||||
ChatMessage chatmessage;
|
||||
|
||||
+ // CraftBukkit start - Connection throttle
|
||||
+ try {
|
||||
@@ -31,9 +31,9 @@
|
||||
+ synchronized (throttleTracker) {
|
||||
+ 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.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext));
|
||||
+ this.b.close(chatcomponenttext);
|
||||
+ chatmessage = new ChatMessage("Connection throttled! Please wait before reconnecting.");
|
||||
+ this.b.sendPacket(new PacketLoginOutDisconnect(chatmessage));
|
||||
+ this.b.close(chatmessage);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
@@ -57,11 +57,11 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
if (packethandshakinginsetprotocol.b() > 332) {
|
||||
chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.12-pre5");
|
||||
this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext));
|
||||
if (packethandshakinginsetprotocol.b() > 333) {
|
||||
chatmessage = new ChatMessage("multiplayer.disconnect.outdated_server", new Object[] { "1.12-pre6"});
|
||||
this.b.sendPacket(new PacketLoginOutDisconnect(chatmessage));
|
||||
@@ -26,6 +71,7 @@
|
||||
this.b.close(chatcomponenttext);
|
||||
this.b.close(chatmessage);
|
||||
} else {
|
||||
this.b.setPacketListener(new LoginListener(this.a, this.b));
|
||||
+ ((LoginListener) this.b.i()).hostname = packethandshakinginsetprotocol.hostname + ":" + packethandshakinginsetprotocol.port; // CraftBukkit - set hostname
|
||||
|
Reference in New Issue
Block a user