diff --git a/server/src/main/java/com/soulfiremc/server/protocol/bot/BotControlAPI.java b/server/src/main/java/com/soulfiremc/server/protocol/bot/BotControlAPI.java index d5f87ca9..744673a7 100644 --- a/server/src/main/java/com/soulfiremc/server/protocol/bot/BotControlAPI.java +++ b/server/src/main/java/com/soulfiremc/server/protocol/bot/BotControlAPI.java @@ -74,11 +74,16 @@ public void tick() { var localTask = this.controllingTask.get(); if (localTask != null) { - localTask.tick(); - if (localTask.isDone()) { localTask.stop(); unregisterControllingTask(localTask); + } else { + localTask.tick(); + + if (localTask.isDone()) { + localTask.stop(); + unregisterControllingTask(localTask); + } } } }