feat: remove ICU self care
This commit is contained in:
@@ -1 +1 @@
|
||||
2360
|
||||
2361
|
||||
@@ -152,8 +152,6 @@ public class Configuration {
|
||||
|
||||
public boolean cspy = true;
|
||||
|
||||
public boolean icu = true;
|
||||
|
||||
public Prefix prefix = new Prefix();
|
||||
|
||||
public static class Prefix {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -122,9 +122,6 @@ selfCare:
|
||||
# commandspy
|
||||
cspy: true
|
||||
|
||||
# icu (icontrolUwU)
|
||||
icu: true
|
||||
|
||||
# extras
|
||||
prefix:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user