From 6232f125277bcca8c2b24bd077071623337be40c Mon Sep 17 00:00:00 2001 From: TudbuT Date: Mon, 27 May 2024 03:58:19 +0200 Subject: [PATCH] improve send keybind to chatcrypt --- .../baseband/client/module/chat/ChatCrypt.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Client/src/main/java/com/baseband/client/module/chat/ChatCrypt.java b/Client/src/main/java/com/baseband/client/module/chat/ChatCrypt.java index e63be4b..53562a3 100644 --- a/Client/src/main/java/com/baseband/client/module/chat/ChatCrypt.java +++ b/Client/src/main/java/com/baseband/client/module/chat/ChatCrypt.java @@ -11,6 +11,7 @@ import com.baseband.client.mixins.ICPacketChat; import com.baseband.client.module.Feature; import com.baseband.client.module.category.Chat; import com.baseband.client.module.render.HUD; +import com.baseband.client.util.config.KeyBind; import com.baseband.client.util.ingame.ChatUtil; import com.baseband.client.util.misc.*; import de.tudbut.tools.Hasher; @@ -85,12 +86,23 @@ public class ChatCrypt extends Feature { BaseBand.notify("§c§lChat>§a Trypt instance reset."); }; + @Config("Password") + public String password = "CLICK HERE"; + + @Config("Toggle Send") + public KeyBind toggleSend = new KeyBind(null, () -> { + this.send = !this.send; + handle.poll("Send"); + if(send) + BaseBand.notify("Sent messages §a§lwill§r be encrypted"); + else + BaseBand.notify("Sent messages §cwill §lnot§r be encrypted"); + }, this); + private Trypt trypt; private final Pattern CHAT_PATTERN = Pattern.compile("(<.*?> )|(.*?: )"); - @Config("Password") - public String password = "CLICK HERE"; public void onEnable() { if(password.isEmpty() || password.equalsIgnoreCase("CLICK HERE")) {