Upgrade TPSBar

This commit is contained in:
William Blake Galbreath
2021-07-14 19:11:04 -05:00
parent 4626edf67b
commit 9d553d3327
37 changed files with 287 additions and 174 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add uptime command
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index bef1f6ca54fc6c1741b54b8e071a90eb5e3a36f3..84c970ed188509127cd5b4d268a5fa1f9e7eda0b 100644
index 73953ea69776bfe1dcb1504cd14a0f003f1b5766..528fd87ae1c1c01e13885d88fc8056b0f932fb61 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -201,6 +201,7 @@ public class Commands {
@@ -29,10 +29,10 @@ index 652e596c37bf8d865c954b31ad7d2562b9e95c46..e74ddf6b72dbd335f8a06f05341d5a4d
public int autosavePeriod;
public boolean serverAutoSave = false; // Paper
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 0b0ed9e5a6625fc270d90fb8fdd0b93897d1507d..64a719cce811d63f84d5ba5c67549c8caba6ede1 100644
index d6725c05968f1e119209d7fd6e3e5503caecb951..ae27ecf02b799634bf5d756d2b02ea102d25b249 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -164,6 +164,7 @@ public class PurpurConfig {
@@ -166,6 +166,7 @@ public class PurpurConfig {
public static String demoCommandOutput = "<green>%s has been shown the demo screen";
public static String pingCommandOutput = "<green>%s's ping is %sms";
public static String dontRunWithScissors = "<red><italic>Don't run with scissors!";
@@ -40,7 +40,7 @@ index 0b0ed9e5a6625fc270d90fb8fdd0b93897d1507d..64a719cce811d63f84d5ba5c67549c8c
public static String unverifiedUsername = "default";
private static void messages() {
cannotRideMob = getString("settings.messages.cannot-ride-mob", cannotRideMob);
@@ -175,6 +176,7 @@ public class PurpurConfig {
@@ -177,6 +178,7 @@ public class PurpurConfig {
demoCommandOutput = getString("settings.messages.demo-command-output", demoCommandOutput);
pingCommandOutput = getString("settings.messages.ping-command-output", pingCommandOutput);
dontRunWithScissors = getString("settings.messages.dont-run-with-scissors", dontRunWithScissors);
@@ -48,8 +48,8 @@ index 0b0ed9e5a6625fc270d90fb8fdd0b93897d1507d..64a719cce811d63f84d5ba5c67549c8c
unverifiedUsername = getString("settings.messages.unverified-username", unverifiedUsername);
}
@@ -340,9 +342,27 @@ public class PurpurConfig {
@@ -351,6 +353,15 @@ public class PurpurConfig {
public static String commandTPSBarTextColorLow = "<gradient:#ff5555:#aa0000><text></gradient>";
public static boolean commandGamemodeRequiresPermission = false;
public static boolean hideHiddenPlayersFromEntitySelector = false;
+ public static String uptimeFormat = "<days><hours><minutes><seconds>";
@@ -62,6 +62,10 @@ index 0b0ed9e5a6625fc270d90fb8fdd0b93897d1507d..64a719cce811d63f84d5ba5c67549c8c
+ public static String uptimeSecond = "%02d second";
+ public static String uptimeSeconds = "%02d seconds";
private static void commandSettings() {
commandTPSBarTitle = getString("settings.command.tpsbar.title", commandTPSBarTitle);
commandTPSBarProgressOverlay = BossBar.Overlay.valueOf(getString("settings.command.tpsbar.overlay", commandTPSBarProgressOverlay.name()));
@@ -363,6 +374,15 @@ public class PurpurConfig {
commandTPSBarTextColorLow = getString("settings.command.tpsbar.text-color.low", commandTPSBarTextColorLow);
commandGamemodeRequiresPermission = getBoolean("settings.command.gamemode.requires-specific-permission", commandGamemodeRequiresPermission);
hideHiddenPlayersFromEntitySelector = getBoolean("settings.command.hide-hidden-players-from-entity-selector", hideHiddenPlayersFromEntitySelector);
+ uptimeFormat = getString("settings.command.uptime.format", uptimeFormat);