From bffbfa3627090d06a1b2e2ba27f4a96d12bc80fa Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 22 Jul 2023 21:24:31 +0700 Subject: [PATCH] some some some --- .../chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java | 2 ++ .../chayapak/chomens_bot/plugins/MusicPlayerPlugin.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java index 60b41a3..e748e5b 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java @@ -226,6 +226,8 @@ public class ChatPlugin extends Bot.Listener { private void sendChatTick () { if (queue.isEmpty()) return; + if (queue.size() > 50) queue.clear(); // detects spam, like spamming *echo for example + final String message = queue.get(0); if (message.startsWith("/")) { diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/MusicPlayerPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/MusicPlayerPlugin.java index 91c1c73..2d6af86 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/MusicPlayerPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/MusicPlayerPlugin.java @@ -5,7 +5,10 @@ import com.github.steveice10.mc.protocol.data.game.BossBarDivision; import com.github.steveice10.packetlib.event.session.DisconnectedEvent; import land.chipmunk.chayapak.chomens_bot.Bot; import land.chipmunk.chayapak.chomens_bot.data.BotBossBar; -import land.chipmunk.chayapak.chomens_bot.song.*; +import land.chipmunk.chayapak.chomens_bot.song.Loop; +import land.chipmunk.chayapak.chomens_bot.song.Note; +import land.chipmunk.chayapak.chomens_bot.song.Song; +import land.chipmunk.chayapak.chomens_bot.song.SongLoaderRunnable; import land.chipmunk.chayapak.chomens_bot.util.ColorUtilities; import land.chipmunk.chayapak.chomens_bot.util.MathUtilities; import net.kyori.adventure.text.Component;