From 3ea7f879b6c7c303718b3eb4bb483638bf2fcc9b Mon Sep 17 00:00:00 2001 From: S-B99 Date: Mon, 28 Oct 2019 19:45:15 -0400 Subject: [PATCH] make customchat not intefere with other clients and have it on by default --- .../zeroeightsix/kami/module/modules/misc/CustomChat.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/misc/CustomChat.java b/src/main/java/me/zeroeightsix/kami/module/modules/misc/CustomChat.java index c78626bc..1304c3b8 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/misc/CustomChat.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/misc/CustomChat.java @@ -10,11 +10,12 @@ import net.minecraft.network.play.client.CPacketChatMessage; /** * Created by 086 on 8/04/2018. + * Updated by S-B99 on 28/10/19 */ @Module.Info(name = "CustomChat", category = Module.Category.MISC, description = "Modifies your chat messages") public class CustomChat extends Module { - private Setting commands = register(Settings.b("Commands", false)); + private Setting commands = register(Settings.b("Commands", true)); private final String KAMI_SUFFIX = " \u23d0 \u1d0b\u1d00\u1d0d\u026a \u0299\u029f\u1d1c\u1d07"; @@ -23,6 +24,9 @@ public class CustomChat extends Module { if (event.getPacket() instanceof CPacketChatMessage) { String s = ((CPacketChatMessage) event.getPacket()).getMessage(); if (s.startsWith("/") && !commands.getValue()) return; + else if (s.startsWith(",") && !commands.getValue()) return; + else if (s.startsWith(".") && !commands.getValue()) return; + else if (s.startsWith("-") && !commands.getValue()) return; s += KAMI_SUFFIX; if (s.length() >= 256) s = s.substring(0,256); ((CPacketChatMessage) event.getPacket()).message = s;