diff --git a/src/main/java/me/chayapak1/chomens_bot/Configuration.java b/src/main/java/me/chayapak1/chomens_bot/Configuration.java index 6027377..da9f69c 100644 --- a/src/main/java/me/chayapak1/chomens_bot/Configuration.java +++ b/src/main/java/me/chayapak1/chomens_bot/Configuration.java @@ -164,6 +164,7 @@ public class Configuration { public String serverName; public boolean useCore = true; public boolean useChat = false; + public boolean coreCommandSpy = false; public int reconnectDelay = 2000; public boolean removeNamespaces = false; public int chatQueueDelay = 125; diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java index 7e6f01d..81746ed 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java @@ -99,7 +99,7 @@ public class SelfCarePlugin extends Bot.Listener { // core else if (selfCares.cspy && !cspy && kaboom) { - if (bot.options.useChat) bot.chat.sendCommandInstantly("/commandspy:commandspy on"); + if (bot.options.useChat || !bot.options.coreCommandSpy) bot.chat.sendCommandInstantly("commandspy:commandspy on"); else bot.core.run("commandspy:commandspy " + bot.username + " on"); } diff --git a/src/main/resources/default-config.yml b/src/main/resources/default-config.yml index dd4778f..3445cad 100644 --- a/src/main/resources/default-config.yml +++ b/src/main/resources/default-config.yml @@ -128,6 +128,7 @@ bots: # serverName - name it whatever you like, it will be used as server name in trusted broadcast and in console # useCore - if enabled it just sends the command using chat instead of using core. recommended to enable useChat too when this is enabled # useChat - when the bot tellraws it will chat instead of using the core to run tellraw + # coreCommandSpy - set to true if server supports enabling player's commandspy though command block # removeNamespaces - when the bot sends a command it will remove like `minecraft:` for example if set to true # coreRateLimit - will ignore commands if reached the ratelimit @@ -138,6 +139,7 @@ bots: serverName: 'Localhost' useCore: true useChat: false + coreCommandSpy: false reconnectDelay: 2000 removeNamespaces: false chatQueueDelay: 125