feat: remove ICU self care

This commit is contained in:
ChomeNS
2025-04-04 10:05:53 +07:00
parent a711e21437
commit ac44bedf8c
4 changed files with 2 additions and 31 deletions

View File

@@ -1 +1 @@
2360
2361

View File

@@ -152,8 +152,6 @@ public class Configuration {
public boolean cspy = true;
public boolean icu = true;
public Prefix prefix = new Prefix();
public static class Prefix {

View File

@@ -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;

View File

@@ -122,9 +122,6 @@ selfCare:
# commandspy
cspy: true
# icu (icontrolUwU)
icu: true
# extras
prefix:
enabled: true