aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-19 19:45:06 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-19 19:45:06 +0200
commita4154d1c998b2af1fc8690016f3df03fa94c2e5b (patch)
tree26ff5b53893419a9fb4ea7d48e3efb21fde18389 /src
parent2f820c489b61634967be9608a44564d113ae6510 (diff)
downloadskyhanni-a4154d1c998b2af1fc8690016f3df03fa94c2e5b.tar.gz
skyhanni-a4154d1c998b2af1fc8690016f3df03fa94c2e5b.tar.bz2
skyhanni-a4154d1c998b2af1fc8690016f3df03fa94c2e5b.zip
Server restart timer no longer shows all the time if over over 2 minutes
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt
index 852580a8d..6568e9234 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt
@@ -29,6 +29,9 @@ class ServerRestartTitle {
val minutes = group("minutes").toInt()
val seconds = group("seconds").toInt()
val totalSeconds = minutes * 60 + seconds
+ if (totalSeconds > 120) {
+ if (totalSeconds % 30 != 0) return
+ }
val time = TimeUtils.formatDuration(totalSeconds.toLong() * 1000)
TitleUtils.sendTitle("§cServer Restart in §b$time", 2_000)
}