summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorMODKILLER1OO12022-08-07 08:29:56 -0400
committerGitHub2022-08-07 08:29:56 -0400
commit2c71d379daa7f986fce3532f93aa445680c41353 (patch)
tree39ae4c7debfa4c2e1c5988f9a92cefac960341f6 /src/main/java/com
parent7c920ffffff1bc68519913ed521cddabf7fe412a (diff)
parent041e6ca18241135af3f79f2c5db726593c57ab80 (diff)
Merge branch 'Aizistral-Studios:1.19.1-Fabric' into 1.19.1-ModMenu-Cloth
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java2
-rw-r--r--src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java16
-rw-r--r--src/main/java/com/aizistral/nochatreports/core/ServerSafetyLevel.java2
3 files changed, 17 insertions, 3 deletions
diff --git a/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java b/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java
index 7f1d28d..e94e9b1 100644
--- a/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java
+++ b/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java
@@ -70,7 +70,7 @@ public class NoChatReportsClient implements ClientModInitializer {
return;
} else if (KEY_DISCONNECT_REASONS.contains(contents.getKey())) {
if (ServerSafetyState.getLastConnectedServer() != null) {
- if (!NoReportsConfig.isWhitelistedServer(ServerSafetyState.getLastConnectedServer())) {
+ if (!NoReportsConfig.isWhitelistedServer(ServerSafetyState.getLastConnectedServer()) && !NoReportsConfig.whitelistAllServers()) {
client.setScreen(new UnsafeServerScreen());
} else {
if (ServerSafetyState.getReconnectCount() <= 0) {
diff --git a/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java b/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java
index bdb908c..d7de215 100644
--- a/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java
+++ b/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java
@@ -44,7 +44,7 @@ public class NoReportsConfig {
convertToGameMessage = false, showServerSafety = true, hideRedChatIndicators = true,
hideYellowChatIndicators = true, hideGrayChatIndicators = true, hideWarningToast = true,
alwaysHideReportButton = false, versionEasterEgg = true, disableTelemetry = true,
- showReloadButton = true;
+ showReloadButton = true, whitelistAllServers = false;
private List<String> whitelistedServers;
public static NoReportsConfig getInstance() {
@@ -136,7 +136,7 @@ public class NoReportsConfig {
* do not feature signatures and look completely identical in the chat, with exception of gray line
* next to them added in pre-release 3. They are also unselectable for chat reporting.<br><br>
*
- * This is true by default.
+ * This is false by default.
*/
public static boolean convertToGameMessage() {
@@ -279,4 +279,16 @@ public class NoReportsConfig {
return getInstance().showReloadButton;
}
+ /**
+ * @return True if the full-screen warning should be skipped for servers that require chat signing,
+ * letting users simply join the server. Because of that, servers will no longer be added to the whitelist.
+ * <br><br>
+ *
+ * This is false by default.
+ */
+
+ public static boolean whitelistAllServers() {
+ return getInstance().whitelistAllServers;
+ }
+
}
diff --git a/src/main/java/com/aizistral/nochatreports/core/ServerSafetyLevel.java b/src/main/java/com/aizistral/nochatreports/core/ServerSafetyLevel.java
index 141116d..2897c5a 100644
--- a/src/main/java/com/aizistral/nochatreports/core/ServerSafetyLevel.java
+++ b/src/main/java/com/aizistral/nochatreports/core/ServerSafetyLevel.java
@@ -47,6 +47,8 @@ public enum ServerSafetyLevel {
@Environment(EnvType.CLIENT)
public Component getTooltip() {
+ if(NoReportsConfig.whitelistAllServers() && this.equals(ServerSafetyLevel.INSECURE))
+ return Component.translatable("gui.nochatreports.status_insecure_whitelist_all_servers");
return Component.translatable("gui.nochatreports.status_" + this.name().toLowerCase());
}
}