improve send keybind to chatcrypt
This commit is contained in:
parent
a240c4b186
commit
6232f12527
1 changed files with 14 additions and 2 deletions
|
@ -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")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue