refactor: just remove ayunboom self care because we can use the forced host ayunboom.shhnowisnottheti.me

This commit is contained in:
ChomeNS
2025-06-22 09:34:21 +07:00
parent 60a2c568a0
commit 724e90aaa0
5 changed files with 1 additions and 50 deletions

View File

@@ -1 +1 @@
3471
3473

View File

@@ -156,7 +156,6 @@ public class Configuration {
public String serverName;
public String discordChannelId;
public String ircChannel;
public boolean isAyunBoom = false;
public boolean hidden = false;
public boolean useCore = true;
public boolean useCorePlaceBlock = false;

View File

@@ -5,7 +5,6 @@ import me.chayapak1.chomens_bot.data.listener.Listener;
import me.chayapak1.chomens_bot.data.player.PlayerEntry;
import me.chayapak1.chomens_bot.data.selfCare.SelfCare;
import me.chayapak1.chomens_bot.data.selfCare.SelfData;
import me.chayapak1.chomens_bot.selfCares.ayunboom.AyunBoomSelfCare;
import me.chayapak1.chomens_bot.selfCares.essentials.*;
import me.chayapak1.chomens_bot.selfCares.kaboom.commandSpy.CommandSpySelfCare;
import me.chayapak1.chomens_bot.selfCares.kaboom.extras.PrefixSelfCare;
@@ -35,9 +34,6 @@ public class SelfCarePlugin implements Listener {
public SelfCarePlugin (final Bot bot) {
this.bot = bot;
// ayunboom
selfCares.add(new AyunBoomSelfCare(bot));
// vanilla
selfCares.add(new OperatorSelfCare(bot));
selfCares.add(new GameModeSelfCare(bot));

View File

@@ -1,43 +0,0 @@
package me.chayapak1.chomens_bot.selfCares.ayunboom;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.selfCare.SelfCare;
import net.kyori.adventure.text.Component;
import org.geysermc.mcprotocollib.network.packet.Packet;
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
public class AyunBoomSelfCare extends SelfCare {
public AyunBoomSelfCare (final Bot bot) {
super(bot);
}
@Override
public boolean shouldRun () {
return bot.options.isAyunBoom;
}
@Override
public void onPacketReceived (final Packet packet) {
if (packet instanceof final ClientboundLoginPacket t_packet) onPacketReceived(t_packet);
}
private void onPacketReceived (final ClientboundLoginPacket ignoredPacket) {
this.needsRunning = true;
}
@Override
public void onMessageReceived (final Component component, final String string) {
if (string.equals("Unable to connect you to ayunboom. Please try again later.")) this.needsRunning = true;
else if (string.equals("You are already connected to this server!")) this.needsRunning = false;
}
@Override
public void run () {
bot.chat.sendCommandInstantly("server ayunboom");
}
@Override
public void cleanup () {
this.needsRunning = true;
}
}

View File

@@ -160,7 +160,6 @@ bots:
# serverName: 'Localhost'
# discordChannelId: '1234567890'
# ircChannel: '#chomens/localhost'
# isAyunBoom: false
# hidden: false
# useCore: true
# useCorePlaceBlock: false