From 6f61c187e5168c3f353a02c86d5b87765bbfcbf3 Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Fri, 14 Oct 2022 12:47:43 -0400 Subject: add more options --- .../nochatreports/config/ModMenuIntegration.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/main/java/com/aizistral') diff --git a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java index d0ee316..88b85c2 100644 --- a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java @@ -177,6 +177,27 @@ public final class ModMenuIntegration implements ModMenuApi { .setSaveConsumer(newValue -> NCRConfig.getClient().enableMod = newValue) .build()); + // Set an option for reconnectAwaitSeconds + technical.addEntry(entryBuilder.startIntField(Component.translatable("option.NoChatReports.reconnectAwaitSeconds"), NCRConfig.getClient().reconnectAwaitSeconds) + .setDefaultValue(4) + .setTooltip(this.makeTooltip("option.NoChatReports.reconnectAwaitSeconds.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getClient().reconnectAwaitSeconds = newValue) + .build()); + + // Set an option for postDisconnectAwaitSeconds + technical.addEntry(entryBuilder.startIntField(Component.translatable("option.NoChatReports.postDisconnectAwaitSeconds"), NCRConfig.getClient().postDisconnectAwaitSeconds) + .setDefaultValue(10) + .setTooltip(this.makeTooltip("option.NoChatReports.postDisconnectAwaitSeconds.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getClient().postDisconnectAwaitSeconds = newValue) + .build()); + + // Set an option for signingCheckDelaySeconds + technical.addEntry(entryBuilder.startIntField(Component.translatable("option.NoChatReports.signingCheckDelaySeconds"), NCRConfig.getClient().signingCheckDelaySeconds) + .setDefaultValue(43200) + .setTooltip(this.makeTooltip("option.NoChatReports.signingCheckDelaySeconds.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getClient().signingCheckDelaySeconds = newValue) + .build()); + // Instructions for adding servers whitelistedServers.addEntry(entryBuilder.startTextDescription(Component.translatable("option.NoChatReports.whitelistedServers.instructions")) .build()); -- cgit v1.2.3 From d809afc2ed88ac3afb37d2aad6760b64c5d9eb15 Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Thu, 20 Oct 2022 09:00:32 -0400 Subject: add more options --- .../aizistral/nochatreports/config/ModMenuIntegration.java | 11 +++++++++++ src/main/resources/assets/nochatreports/lang/en_us.json | 3 +++ 2 files changed, 14 insertions(+) (limited to 'src/main/java/com/aizistral') diff --git a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java index 88b85c2..a0b88b2 100644 --- a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java @@ -198,6 +198,17 @@ public final class ModMenuIntegration implements ModMenuApi { .setSaveConsumer(newValue -> NCRConfig.getClient().signingCheckDelaySeconds = newValue) .build()); + // Warning for showEncryptionButton + technical.addEntry(entryBuilder.startTextDescription(Component.translatable("gui.NoChatReports.showEncryptionButtonWarning")) + .build()); + + // Set an option for showEncryptionButton + technical.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.showEncryptionButton"), NCRConfig.getEncryption().showEncryptionButton) + .setDefaultValue(true) + .setTooltip(this.makeTooltip("option.NoChatReports.showEncryptionButton.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getEncryption().showEncryptionButton = newValue) + .build()); + // Instructions for adding servers whitelistedServers.addEntry(entryBuilder.startTextDescription(Component.translatable("option.NoChatReports.whitelistedServers.instructions")) .build()); diff --git a/src/main/resources/assets/nochatreports/lang/en_us.json b/src/main/resources/assets/nochatreports/lang/en_us.json index 98093c7..67917ad 100644 --- a/src/main/resources/assets/nochatreports/lang/en_us.json +++ b/src/main/resources/assets/nochatreports/lang/en_us.json @@ -51,6 +51,7 @@ "gui.nochatreports.realms_warning.contents": "Please be aware that from standpoint of both privacy and security, Realms servers are inherently unsafe to play on. Not only there is no way around chat reports there, but Mojang employ automated chat monitoring to identify potential \"online harms\" and escalate them to human review. Even as realm owner there is nothing you can do to prevent this, and rules are known to be enforced indiscriminately, regardless of consensus between chat participants. Use of encryption is highly advised.", "gui.nochatreports.realms_warning.check": "Don't show again", "gui.nochatreports.realms_warning.learn_more": "Learn More", + "gui.NoChatReports.showEncryptionButtonWarning": "§cBelow does not disable encryption, it only hides the button!", "configuration.NoChatReports.config": "No Chat Reports", @@ -100,6 +101,8 @@ "option.NoChatReports.signingCheckDelaySeconds.tooltip": "Delay for checking whether whitelisted servers still enforce chat signing, in seconds. Setting this to 0 will cause check to be performed on every login attempt, similar to non-whitelisted servers.", "option.NoChatReports.serverSigningChecks": "Server signing checks", "option.NoChatReports.serverSigningChecks.tooltip": "Map of whitelisted servers to last signing enforcement check times, in epoch seconds. This typically does not have to be edited manually.", + "option.NoChatReports.showEncryptionButton": "Show encryption button", + "option.NoChatReports.showEncryptionButton.tooltip": "Setting this to false will simply prevent encryption button from being displayed in the chat screen. Be aware that encryption itself will not be automatically disabled along with the button.", "configuration.NoChatReports.category.whitelistedServers": "Whitelisted Servers", -- cgit v1.2.3