diff --git a/Client/src/main/java/com/baseband/client/feature/chat/ChatAppend.java b/Client/src/main/java/com/baseband/client/feature/chat/ChatAppend.java index 13d77c0..21d661d 100644 --- a/Client/src/main/java/com/baseband/client/feature/chat/ChatAppend.java +++ b/Client/src/main/java/com/baseband/client/feature/chat/ChatAppend.java @@ -5,6 +5,7 @@ import com.baseband.client.feature.category.Chat; import com.baseband.client.registry.annotation.Config; import com.baseband.client.registry.annotation.Gate; import com.baseband.client.util.adapt.Marker; +import com.baseband.client.util.interact.ChatUtil; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -41,7 +42,9 @@ public class ChatAppend extends Feature { if(message.matches("\\W.*")) return; - event.setMessage(applyWatermark((custom ? (customUnicodeToggle ? toUnicode(customWatermark) : customWatermark) : toUnicode("baseband")), message)); + ChatUtil.history(message); + ChatUtil.send(applyWatermark((custom ? (customUnicodeToggle ? toUnicode(customWatermark) : customWatermark) : toUnicode("baseband")), message), false); + event.setCanceled(true); } private String applyWatermark(String watermark, String text) { diff --git a/Client/src/main/java/com/baseband/client/util/interact/ChatUtil.java b/Client/src/main/java/com/baseband/client/util/interact/ChatUtil.java index 318076d..affbf56 100644 --- a/Client/src/main/java/com/baseband/client/util/interact/ChatUtil.java +++ b/Client/src/main/java/com/baseband/client/util/interact/ChatUtil.java @@ -51,6 +51,9 @@ public class ChatUtil { public static void simulateSend(String msg, boolean addToHistory) { msg = net.minecraftforge.event.ForgeEventFactory.onClientSendMessage(msg); + send(msg, addToHistory); + } + public static void send(String msg, boolean addToHistory) { if (msg.isEmpty()) return; if (addToHistory) { Minecraft.getMinecraft().ingameGUI.getChatGUI().addToSentMessages(msg);