have toggle for CC:keep
This commit is contained in:
parent
3552b973c3
commit
d5ee578f57
1 changed files with 10 additions and 9 deletions
|
@ -68,19 +68,21 @@ public class ChatCrypt extends Feature {
|
|||
@Gate(1)
|
||||
public int boxSize = 256;
|
||||
|
||||
@Config("Allow CC:keep")
|
||||
@Gate(2)
|
||||
public boolean allowCCKeep = true;
|
||||
|
||||
@Config("Keep Trypt instance")
|
||||
@Gate(2)
|
||||
@Marker(3)
|
||||
public boolean keepTrypt = false;
|
||||
|
||||
@Config("Warning! More secure, worse QOL")
|
||||
@MultiGate(and = {3, -2})
|
||||
@Marker(-2)
|
||||
public boolean _keep_info = true;
|
||||
|
||||
@Config("Reset Trypt")
|
||||
@MultiGate(and = {2, 3})
|
||||
public Button.ClickEvent resetTrypt = btn -> trypt = null;
|
||||
public Button.ClickEvent resetTrypt = btn -> {
|
||||
trypt = null;
|
||||
HUD.notifyAndPrint("§c§lChat>§a Trypt instance reset.");
|
||||
};
|
||||
|
||||
private Trypt trypt;
|
||||
|
||||
|
@ -89,7 +91,6 @@ public class ChatCrypt extends Feature {
|
|||
@Config("Password")
|
||||
public String password = "CLICK HERE";
|
||||
|
||||
@SuppressWarnings("ConstantValue")
|
||||
public void onEnable() {
|
||||
if(password.isEmpty() || password.equalsIgnoreCase("CLICK HERE")) {
|
||||
toggle();
|
||||
|
@ -135,7 +136,7 @@ public class ChatCrypt extends Feature {
|
|||
GlobalUtil.LOGGER.debug("Successfully kept Trypt key up-to-date.");
|
||||
}
|
||||
else {
|
||||
HUD.notifyAndPrint("§c§lChat>§c Unable to keep Trypt key up-to-date. Disabled keep. (Enable and sync by sending CC:keep)");
|
||||
HUD.notifyAndPrint("§c§lChat>§c Unable to keep Trypt key up-to-date. Disabled keep." + (allowCCKeep ? " (Enable and sync by sending CC:keep)" : ""));
|
||||
keepTrypt = false;
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +144,7 @@ public class ChatCrypt extends Feature {
|
|||
sentEncrypted = null;
|
||||
sentOriginal = null;
|
||||
|
||||
if(!useSBE && message.equals("CC:keep")) {
|
||||
if(!useSBE && message.equals("CC:keep") && allowCCKeep) {
|
||||
keepTrypt = true;
|
||||
trypt = null;
|
||||
HUD.notifyAndPrint("§c§lChat>§c Enabled and synchronized Trypt keep.");
|
||||
|
|
Loading…
Add table
Reference in a new issue