From 5d8147a8f965fe9d101ee7581dc81c71c3855721 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 28 Sep 2022 12:36:22 +0700 Subject: [PATCH] =?UTF-8?q?=D1=81=D1=8B=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt index db22a8596..d0986292a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt @@ -27,7 +27,7 @@ private val preServerTickTimers = TimerQueue() private val postServerTickTimers = TimerQueue() fun addPreTickTimer(inTicks: Int, callback: Runnable): TimerQueue.Timer? { - if (SERVER_IS_LIVE) { + if (!SERVER_IS_LIVE) { LOGGER.error("Refusing to add timer $callback in ticks $inTicks while server is dying", IllegalStateException("Server is stopping")) return null } @@ -36,7 +36,7 @@ fun addPreTickTimer(inTicks: Int, callback: Runnable): TimerQueue.Timer? { } fun addPostTickTimer(inTicks: Int, callback: Runnable): TimerQueue.Timer? { - if (SERVER_IS_LIVE) { + if (!SERVER_IS_LIVE) { LOGGER.error("Refusing to add ticker $callback in ticks $inTicks while server is dying", IllegalStateException("Server is stopping")) return null }