@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user