mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
fix config option in last commit
This commit is contained in:
parent
448d693a4b
commit
77c45fe41a
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user