From ef8f2be4cfad374899bece7d4f2336ed57f677b6 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 5 May 2023 09:47:28 +0700 Subject: [PATCH] some update yea yeah --- .../chayapak/chomens_bot/commands/CommandBlockCommand.java | 2 ++ .../land/chipmunk/chayapak/chomens_bot/plugins/CorePlugin.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/CommandBlockCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/CommandBlockCommand.java index 5671405..7b022ca 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/CommandBlockCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/CommandBlockCommand.java @@ -46,6 +46,8 @@ public class CommandBlockCommand implements Command { final CompletableFuture future = bot.core().runTracked(String.join(" ", args)); + if (future == null) return null; + future.thenApply(tags -> { if (!tags.contains("LastOutput") || !(tags.get("LastOutput") instanceof StringTag)) return tags; diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CorePlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CorePlugin.java index d8352be..385b572 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CorePlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CorePlugin.java @@ -106,6 +106,8 @@ public class CorePlugin extends PositionPlugin.Listener { run(command); + if (!bot.options().useCore()) return null; + final int transactionId = nextTransactionId++; // promises are renamed to future lmao