@@ -18,10 +18,17 @@
|
||||
private final MinecraftServer a;
|
||||
private final NetworkManager b;
|
||||
|
||||
@@ -16,6 +26,41 @@
|
||||
@@ -11,12 +21,48 @@
|
||||
}
|
||||
|
||||
public void a(PacketHandshakingInSetProtocol packethandshakinginsetprotocol) {
|
||||
+ this.b.channel.pipeline().get(PacketEncoder.class).version = packethandshakinginsetprotocol.b(); // CraftBukkit
|
||||
switch (HandshakeListener.SyntheticClass_1.a[packethandshakinginsetprotocol.a().ordinal()]) {
|
||||
case 1:
|
||||
this.b.setProtocol(EnumProtocol.LOGIN);
|
||||
ChatComponentText chatcomponenttext;
|
||||
|
||||
- if (packethandshakinginsetprotocol.b() > 107) {
|
||||
+ // CraftBukkit start - Connection throttle
|
||||
+ try {
|
||||
+ long currentTime = System.currentTimeMillis();
|
||||
@@ -57,10 +64,11 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
if (packethandshakinginsetprotocol.b() > 107) {
|
||||
+ if (packethandshakinginsetprotocol.b() > 108) {
|
||||
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);
|
||||
@@ -26,6 +72,7 @@
|
||||
this.b.close(chatcomponenttext);
|
||||
} else {
|
||||
this.b.setPacketListener(new LoginListener(this.a, this.b));
|
||||
|
||||
Reference in New Issue
Block a user