diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/sdashb/experimental/SendUnicodeModule.java b/src/main/java/me/zeroeightsix/kami/module/modules/sdashb/experimental/SendUnicodeModule.java index 18eb0fe88..ba67fe638 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/sdashb/experimental/SendUnicodeModule.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/sdashb/experimental/SendUnicodeModule.java @@ -4,16 +4,18 @@ import me.zero.alpine.listener.EventHandler; 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 me.zeroeightsix.kami.setting.Settings; import net.minecraft.network.play.client.CPacketChatMessage; /** * @author S-B99 * Updated by S-B99 on 28/10/19 */ -@Module.Info(name = "SendUnicode", category = Module.Category.MISC, description = "Converts all text into raw unicode") +@Module.Info(name = "SendRawUnicode", category = Module.Category.MISC, description = "Converts all text into raw unicode") public class SendUnicodeModule extends Module { - //private Setting commands = register(Settings.b("Convert", true)); + private Setting commands = register(Settings.b("Off on commands", false)); //private final String KAMI_SUFFIX = " \u23d0 \u1d0b\u1d00\u1d0d\u026a \u0299\u029f\u1d1c\u1d07"; @@ -21,13 +23,13 @@ public class SendUnicodeModule extends Module { public Listener listener = new Listener<>(event -> { if (event.getPacket() instanceof CPacketChatMessage) { String toSend = ((CPacketChatMessage) event.getPacket()).getMessage(); - if (toSend.startsWith("/")) + if (toSend.startsWith("/") && !commands.getValue()) return; - else if (toSend.startsWith(",")) + else if (toSend.startsWith(",") && !commands.getValue()) return; - else if (toSend.startsWith(".")) + else if (toSend.startsWith(".") && !commands.getValue()) return; - else if (toSend.startsWith("-")) + else if (toSend.startsWith("-") && !commands.getValue()) return; //toSend = toSend;//KAMI_SUFFIX;