From 2a3f4acc2861916d54341cdad5a883beec52c0bf Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 8 Apr 2023 13:01:15 +0700 Subject: [PATCH] actually remove whisper and just ignore it because yes --- .../chomens_bot/plugins/ChatPlugin.java | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) 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 a483487..aee8dd4 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 @@ -84,9 +84,7 @@ public class ChatPlugin extends SessionAdapter { } } - public void send (String _message, String prefix) { - final String message = prefix + _message; - + public void send (String message) { final String[] splitted = message.split("(?<=\\G.{100})|\\n"); int i = 200; @@ -121,23 +119,12 @@ public class ChatPlugin extends SessionAdapter { } } - public void send (String message) { - send(message, ""); - } - - public void whisper (String targets, String message) { - send(message, "/tell " + targets + " "); - } - public void tellraw (Component component, String targets) { if (bot.useChat()) { - if (targets.equals("@a")) { - final String stringified = ComponentUtilities.stringifyMotd(component).replace("§", "&"); - send(stringified); - } else { - final String stringified = ComponentUtilities.stringify(component); - whisper(targets, stringified); - } + if (!targets.equals("@a")) return; // worst fix of all time!1! + + final String stringified = ComponentUtilities.stringifyMotd(component).replace("§", "&"); + send(stringified); } else { bot.core().run("minecraft:tellraw " + targets + " " + GsonComponentSerializer.gson().serialize(component)); }