From 46bf78c98425c6f0c60e9a25d4cd1d079e345a99 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:54:18 +0700 Subject: [PATCH] make commandspy selfcare silent = QUIET self care (only /prefix left) --- .../me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 8b5f54d..7e6f01d 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java @@ -96,7 +96,14 @@ public class SelfCarePlugin extends Bot.Listener { // chat only if (selfCares.op && permissionLevel < 2) bot.chat.send("/minecraft:op @s[type=player]"); else if (selfCares.gamemode && gamemode != GameMode.CREATIVE && !bot.options.creayun) bot.chat.send("/minecraft:gamemode creative @s[type=player]"); - else if (selfCares.cspy && !cspy && kaboom) bot.chat.send("/commandspy:commandspy on"); + + // core + else if (selfCares.cspy && !cspy && kaboom) { + if (bot.options.useChat) bot.chat.sendCommandInstantly("/commandspy:commandspy on"); + else bot.core.run("commandspy:commandspy " + bot.username + " on"); + } + + // back to chat only else if (selfCares.prefix.enabled && !prefix && kaboom && !bot.options.creayun) bot.chat.send("/extras:prefix " + bot.config.selfCare.prefix.prefix); else if (selfCares.username && !username && kaboom) bot.chat.send("/extras:username " + bot.username);