mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
configurable per world tpsbar
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] MSPT Tracking for each world
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/task/TPSBarTask.java b/src/main/java/org/purpurmc/purpur/task/TPSBarTask.java
|
||||
index 8769993e7ca59da309087051a3cd38fc562c15d1..28da3818844f649736af5f1a3226376dee1eb8b1 100644
|
||||
index 8769993e7ca59da309087051a3cd38fc562c15d1..2eda6de8df6f8eb90bb84d12c3a88ca303664df4 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/task/TPSBarTask.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/task/TPSBarTask.java
|
||||
@@ -4,6 +4,8 @@ import net.kyori.adventure.bossbar.BossBar;
|
||||
@@ -25,7 +25,7 @@ index 8769993e7ca59da309087051a3cd38fc562c15d1..28da3818844f649736af5f1a3226376d
|
||||
- bossbar.color(getBossBarColor());
|
||||
- bossbar.name(MiniMessage.miniMessage().deserialize(PurpurConfig.commandTPSBarTitle,
|
||||
+ // DivineMC start - MSPT Tracking for each world
|
||||
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking) {
|
||||
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking && org.bxteam.divinemc.config.DivineConfig.AsyncCategory.usePerWorldTpsBar) {
|
||||
+ ServerLevel serverLevel = ((CraftWorld)player.getWorld()).getHandle();
|
||||
+
|
||||
+ double worldMspt = calculateWorldMSPT(serverLevel);
|
||||
|
||||
@@ -197,6 +197,7 @@ public class DivineConfig {
|
||||
public static boolean logContainerCreationStacktraces = false;
|
||||
public static boolean disableHardThrow = false;
|
||||
public static boolean pwtCompatabilityMode = false;
|
||||
public static boolean usePerWorldTpsBar = true;
|
||||
|
||||
// Regionized chunk ticking
|
||||
public static boolean enableRegionizedChunkTicking = false;
|
||||
@@ -243,6 +244,8 @@ public class DivineConfig {
|
||||
"Disables annoying 'not on main thread' throws. But, THIS IS NOT RECOMMENDED because you SHOULD FIX THE ISSUES THEMSELVES instead of RISKING DATA CORRUPTION! If you lose something, take the blame on yourself.");
|
||||
pwtCompatabilityMode = getBoolean(ConfigCategory.ASYNC.key("parallel-world-ticking.compatability-mode"), pwtCompatabilityMode,
|
||||
"Enables compatibility mode for plugins that are not compatible with Parallel World Ticking. This makes all async tasks run synchronously.");
|
||||
usePerWorldTpsBar = getBoolean(ConfigCategory.ASYNC.key("parallel-world-ticking.use-per-world-tps-bar"), usePerWorldTpsBar,
|
||||
"Enables per-world TPS bar, which shows the TPS of the world the player is currently in. TPS bar can be turned on/off with /tpsbar command.");
|
||||
}
|
||||
|
||||
private static void regionizedChunkTicking() {
|
||||
|
||||
Reference in New Issue
Block a user