From a4154d1c998b2af1fc8690016f3df03fa94c2e5b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 19 Jul 2023 19:45:06 +0200 Subject: Server restart timer no longer shows all the time if over over 2 minutes --- .../java/at/hannibal2/skyhanni/features/misc/ServerRestartTitle.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main') 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) } -- cgit