From 77c45fe41a49e446bc738fc5e0885744455cdd3e Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 25 Aug 2020 13:23:58 +0100 Subject: [PATCH] fix config option in last commit --- Spigot-Server-Patches/Buffer-joins-to-world.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Buffer-joins-to-world.patch b/Spigot-Server-Patches/Buffer-joins-to-world.patch index 6bcbeef664..62db77169c 100644 --- a/Spigot-Server-Patches/Buffer-joins-to-world.patch +++ b/Spigot-Server-Patches/Buffer-joins-to-world.patch @@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + public static int maxJoinsPerTick; + private static void maxJoinsPerTick() { -+ getInt("settings.max-joins-per-tick", 3); ++ maxJoinsPerTick = getInt("settings.max-joins-per-tick", 3); + } } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java @@ -43,6 +43,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this.packetListener instanceof LoginListener) { + if ( ((LoginListener) this.packetListener).getLoginState() != LoginListener.EnumProtocolState.READY_TO_ACCEPT // Paper + || (joinAttemptsThisTick++ < MAX_PER_TICK)) { // Paper - limit the number of joins which can be processed each tick ++ System.out.println("tick " + joinAttemptsThisTick + "/" + MAX_PER_TICK); ((LoginListener) this.packetListener).tick(); + } // Paper }