Implement TPSBar

This commit is contained in:
William Blake Galbreath
2025-01-10 00:52:43 -08:00
committed by granny
parent 55eb63b89c
commit 42bf7db018
14 changed files with 402 additions and 486 deletions

View File

@@ -17,6 +17,14 @@
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
@@ -1093,6 +_,7 @@
this.safeShutdown(waitForServer, false);
}
public void safeShutdown(boolean waitForServer, boolean isRestarting) {
+ org.purpurmc.purpur.task.BossBarTask.stopAll(); // Purpur - Implement TPSBar
this.isRestarting = isRestarting;
this.hasLoggedStop = true; // Paper - Debugging
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
@@ -1112,6 +_,7 @@
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
private long lastTick = 0;