From ac44bedf8ca49aca3eee8370eb6eae6a404b98d4 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:05:53 +0700 Subject: [PATCH] feat: remove ICU self care --- build-number.txt | 2 +- .../chayapak1/chomens_bot/Configuration.java | 2 -- .../chomens_bot/plugins/SelfCarePlugin.java | 26 +------------------ src/main/resources/default-config.yml | 3 --- 4 files changed, 2 insertions(+), 31 deletions(-) diff --git a/build-number.txt b/build-number.txt index 56c95e95..65c813b0 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -2360 \ No newline at end of file +2361 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/Configuration.java b/src/main/java/me/chayapak1/chomens_bot/Configuration.java index 50ea350c..fe0a7b60 100644 --- a/src/main/java/me/chayapak1/chomens_bot/Configuration.java +++ b/src/main/java/me/chayapak1/chomens_bot/Configuration.java @@ -152,8 +152,6 @@ public class Configuration { public boolean cspy = true; - public boolean icu = true; - public Prefix prefix = new Prefix(); public static class Prefix { 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 2eba7788..6263c8a7 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/SelfCarePlugin.java @@ -2,7 +2,6 @@ package me.chayapak1.chomens_bot.plugins; import me.chayapak1.chomens_bot.Bot; import me.chayapak1.chomens_bot.Configuration; -import me.chayapak1.chomens_bot.data.player.PlayerEntry; import net.kyori.adventure.text.Component; import org.geysermc.mcprotocollib.network.Session; import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent; @@ -26,9 +25,7 @@ import java.util.Arrays; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; -public class SelfCarePlugin - extends Bot.Listener - implements ChatPlugin.Listener, CommandSpyPlugin.Listener, PositionPlugin.Listener { +public class SelfCarePlugin extends Bot.Listener implements ChatPlugin.Listener { private final Bot bot; private ScheduledFuture checkTask; @@ -54,8 +51,6 @@ public class SelfCarePlugin bot.addListener(this); bot.chat.addListener(this); - bot.commandSpy.addListener(this); - bot.position.addListener(this); } @Override @@ -95,25 +90,6 @@ public class SelfCarePlugin return true; } - @Override - public void commandReceived (PlayerEntry sender, String command) { - final String trimmedCommand = command - .trim() - .replaceAll("\\s+", " "); - - final String controlPart = " control " + bot.profile.getName(); - - if ( - !bot.config.selfCare.icu || - ( - !trimmedCommand.equals("/icontrolu:icu" + controlPart) && - !trimmedCommand.equals("/icu" + controlPart) - ) - ) return; - - bot.core.run("essentials:sudo " + sender.profile.getIdAsString() + " icu stop"); - } - public void check () { final Configuration.SelfCare selfCares = bot.config.selfCare; diff --git a/src/main/resources/default-config.yml b/src/main/resources/default-config.yml index 289fb134..4f94bfd9 100644 --- a/src/main/resources/default-config.yml +++ b/src/main/resources/default-config.yml @@ -122,9 +122,6 @@ selfCare: # commandspy cspy: true - # icu (icontrolUwU) - icu: true - # extras prefix: enabled: true