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 af0bf5308..0b663f035 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 @@ -4,6 +4,7 @@ import me.zero.alpine.listener.Listener; import me.zeroeightsix.kami.event.events.PacketEvent; import me.zeroeightsix.kami.module.Module; +import me.zeroeightsix.kami.setting.Setting; import net.minecraft.network.play.client.CPacketChatMessage; /** @@ -12,12 +13,16 @@ @Module.Info(name = "CustomChat", category = Module.Category.MISC, description = "Modifies your chat messages") public class CustomChat extends Module { + @Setting(name = "Commands") + public boolean commands = false; + private final String KAMI_SUFFIX = " \u23D0 \u1D0B\u1D00\u1D0D\u026A"; @EventHandler public Listener listener = new Listener<>(event -> { if (event.getPacket() instanceof CPacketChatMessage) { String s = ((CPacketChatMessage) event.getPacket()).getMessage(); + if (s.startsWith("/") && !commands) return; s += KAMI_SUFFIX; if (s.length() >= 256) s = s.substring(0,256); ((CPacketChatMessage) event.getPacket()).message = s;