mirror of https://github.com/kami-blue/client
add sendunicode module
This commit is contained in:
parent
c1d26f77da
commit
2f8572cffd
|
@ -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<Boolean> commands = register(Settings.b("Convert", true));
|
||||
private Setting<Boolean> 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<PacketEvent.Send> 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;
|
||||
|
|
Loading…
Reference in New Issue