Update to Minecraft 1.9.2

By: Thinkofname <thinkofdeath@spigotmc.org>
This commit is contained in:
CraftBukkit/Spigot
2016-03-30 20:50:59 +01:00
parent 8ea7bfcb8c
commit 094f30f26d
30 changed files with 126 additions and 182 deletions

View File

@@ -18,7 +18,7 @@
private final MinecraftServer a;
private final NetworkManager b;
@@ -11,12 +21,48 @@
@@ -11,21 +21,58 @@
}
public void a(PacketHandshakingInSetProtocol packethandshakinginsetprotocol) {
@@ -28,7 +28,6 @@
this.b.setProtocol(EnumProtocol.LOGIN);
ChatComponentText chatcomponenttext;
- if (packethandshakinginsetprotocol.b() > 107) {
+ // CraftBukkit start - Connection throttle
+ try {
+ long currentTime = System.currentTimeMillis();
@@ -64,11 +63,14 @@
+ }
+ // CraftBukkit end
+
+ if (packethandshakinginsetprotocol.b() > 109) {
chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.9");
if (packethandshakinginsetprotocol.b() > 109) {
chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.9.2");
this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext));
this.b.close(chatcomponenttext);
@@ -26,6 +72,7 @@
- } else if (packethandshakinginsetprotocol.b() < 109) {
+ } else if (packethandshakinginsetprotocol.b() < 107) {
chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.9.2");
this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext));
this.b.close(chatcomponenttext);
} else {
this.b.setPacketListener(new LoginListener(this.a, this.b));