From 8915660ed6c28d2754aa53ad5e0869234a83e1da Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Sat, 27 Aug 2022 16:11:18 -0400 Subject: Add lan options and verified server options --- .../nochatreports/config/ModMenuIntegration.java | 52 ++++++++++++++++++---- .../resources/assets/nochatreports/lang/en_us.json | 29 +++++++++--- 2 files changed, 67 insertions(+), 14 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java index d42864f..4e949bc 100644 --- a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java @@ -55,6 +55,7 @@ public final class ModMenuIntegration implements ModMenuApi { ConfigCategory visual = builder.getOrCreateCategory(Component.translatable("configuration.NoChatReports.category.visual")); ConfigCategory technical = builder.getOrCreateCategory(Component.translatable("configuration.NoChatReports.category.technical")); ConfigCategory whitelistedServers = builder.getOrCreateCategory(Component.translatable("configuration.NoChatReports.category.whitelistedServers")); + ConfigCategory lanOptions = builder.getOrCreateCategory(Component.translatable("configuration.NoChatReports.category.lanOptions")); ConfigEntryBuilder entryBuilder = builder.entryBuilder(); @@ -71,6 +72,27 @@ public final class ModMenuIntegration implements ModMenuApi { .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Component.translatable("https://github.com/Aizistral-Studios/No-Chat-Reports/wiki/Configuration-Files/#option-showserversafety"))).withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/Aizistral-Studios/No-Chat-Reports/wiki/Configuration-Files/#option-showserversafety")))) .build()); + // Set an option for verifiedIconEnabled + visual.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.verifiedIconEnabled"), NCRConfig.getClient().verifiedIconEnabled) + .setDefaultValue(true) + .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconEnabled.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconEnabled = newValue) + .build()); + + // Set an option for verifiedIconOffsetX + visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetX"), NCRConfig.getClient().verifiedIconOffsetX, 0, 10) + .setDefaultValue(0) + .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconOffsetX.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconOffsetX = newValue) + .build()); + + // Set an option for verifiedIconOffsetY + visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetY"), NCRConfig.getClient().verifiedIconOffsetY, 0, 10) + .setDefaultValue(0) + .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconOffsetY.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconOffsetY = newValue) + .build()); + // Set an option for hideRedChatIndicators visual.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.hideRedChatIndicators"), NCRConfig.getClient().hideRedChatIndicators) .setDefaultValue(true) @@ -113,8 +135,6 @@ public final class ModMenuIntegration implements ModMenuApi { .setSaveConsumer(newValue -> NCRConfig.getClient().demandOnServer = newValue) .build()); - // TODO Where's the one for demandOnClient? - // Set an option for enableDebugLog technical.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.enableDebugLog"), NCRConfig.getCommon().enableDebugLog) .setDefaultValue(false) @@ -122,13 +142,6 @@ public final class ModMenuIntegration implements ModMenuApi { .setSaveConsumer(newValue -> NCRConfig.getCommon().enableDebugLog = newValue) .build()); - // Set an option for convertToGameMessage - technical.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.convertToGameMessage"), NCRConfig.getCommon().convertToGameMessage) - .setDefaultValue(false) - .setTooltip(this.makeTooltip("option.NoChatReports.convertToGameMessage.tooltip")) - .setSaveConsumer(newValue -> NCRConfig.getCommon().convertToGameMessage = newValue) - .build()); - // Set an option for disableTelemetry technical.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.disableTelemetry"), NCRConfig.getClient().disableTelemetry) .setDefaultValue(true) @@ -166,6 +179,27 @@ public final class ModMenuIntegration implements ModMenuApi { .setCreateNewInstance(baseListEntry -> new StringListListEntry.StringListCell(Language.getInstance().getOrDefault(("option.NoChatReports.whitelistedServers.serverAddress")), baseListEntry)) .build()); + // Set an option for demandOnClient + lanOptions.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.demandOnClient"), NCRConfig.getCommon().demandOnClient) + .setDefaultValue(true) + .setTooltip(this.makeTooltip("option.NoChatReports.demandOnClient.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getCommon().demandOnClient = newValue) + .build()); + + // Set an option for convertToGameMessage + lanOptions.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.convertToGameMessage"), NCRConfig.getCommon().convertToGameMessage) + .setDefaultValue(false) + .setTooltip(this.makeTooltip("option.NoChatReports.convertToGameMessage.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getCommon().convertToGameMessage = newValue) + .build()); + + // Set an option for addQueryData + lanOptions.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.addQueryData"), NCRConfig.getCommon().addQueryData) + .setDefaultValue(true) + .setTooltip(this.makeTooltip("option.NoChatReports.addQueryData.tooltip")) + .setSaveConsumer(newValue -> NCRConfig.getCommon().addQueryData = newValue) + .build()); + // Save config builder.setSavingRunnable(NCRConfig::save); return builder.build(); diff --git a/src/main/resources/assets/nochatreports/lang/en_us.json b/src/main/resources/assets/nochatreports/lang/en_us.json index 195e4ed..d0b57be 100644 --- a/src/main/resources/assets/nochatreports/lang/en_us.json +++ b/src/main/resources/assets/nochatreports/lang/en_us.json @@ -15,12 +15,18 @@ "gui.nochatreports.verified_server": "§a§lSafe Server§r\nWe could verify that this server has No Chat Reports installed, or prevents chat reports in some other known way. You can chat there safely.", "configuration.NoChatReports.config": "No Chat Reports", + "configuration.NoChatReports.category.visual": "Visual", - "configuration.NoChatReports.category.technical": "Technical", - "configuration.NoChatReports.category.whitelistedServers": "Whitelisted Servers", + "option.NoChatReports.showServerSafety": "Show server safety", "option.NoChatReports.showServerSafety.tooltip": "Allows the client to display server safety status in bottom-right corner of chat screen. The icon is hoverable for additional information.", "option.NoChatReports.showServerSafety.moreInfo": "§bClick here to read more about server safety levels", + "option.NoChatReports.verifiedIconEnabled": "Verified icon enabled", + "option.NoChatReports.verifiedIconEnabled.tooltip": "Allows the mod to display special icon in multiplayer menu for servers that have No Chat Reports or some other anti-chat-reporting measures installed.", + "option.NoChatReports.verifiedIconOffsetX": "Verified icon offset X", + "option.NoChatReports.verifiedIconOffsetX.tooltip": "Defines X-axis offset for rendering of \"Safe Server\" icon.", + "option.NoChatReports.verifiedIconOffsetY": "Verified icon offset Y", + "option.NoChatReports.verifiedIconOffsetY.tooltip": "Defines Y-axis offset for rendering of \"Safe Server\" icon.", "option.NoChatReports.hideRedChatIndicators": "Hide red chat indicators", "option.NoChatReports.hideRedChatIndicators.tooltip": "Prevents the client from displaying \"Not Secure\" indicators, in the form of red bar to the left and §c§l(§r§c!§c§l)§r icon to the right of chat message.", "option.NoChatReports.hideYellowChatIndicators": "Hide yellow chat indicators", @@ -31,22 +37,35 @@ "option.NoChatReports.hideWarningToast.tooltip": "Removes a warning toast that is displayed when entering servers with disabled §oenforce-secure-profile§r.", "option.NoChatReports.alwaysHideReportButton": "Always hide report button", "option.NoChatReports.alwaysHideReportButton.tooltip": "Prevents the client from ever showing report button in Social Interactions screen. This is disabled by default, and mod simply makes button inactive on servers that have No Chat Reports installed, adding an explanation to the tooltip of the button.", + + "configuration.NoChatReports.category.technical": "Technical", + "option.NoChatReports.demandOnServer": "Demand on server", "option.NoChatReports.demandOnServer.tooltip": "Prevents the client from joining servers that don't have No Chat Reports installed.", "option.NoChatReports.enableDebugLog": "Enable debug log", "option.NoChatReports.enableDebugLog.tooltip": "Enables logging of certain debug information. This is generally useless for non-developers.", - "option.NoChatReports.convertToGameMessage": "Convert to game message", - "option.NoChatReports.convertToGameMessage.tooltip": "Makes the server convert all player messages into system messages. System messages don't have any signatures attached and cannot be reported; on unmodified clients they will display with gray bar to the left.", "option.NoChatReports.disableTelemetry": "Disable telemetry", "option.NoChatReports.disableTelemetry.tooltip": "Allows the mod to disable built-in telemetry, similar to how No Telemetry does.", "option.NoChatReports.showReloadButton": "Show reload button", "option.NoChatReports.showReloadButton.tooltip": "Adds a button for config reloading to Multiplayer menu.", "option.NoChatReports.whitelistAllServers": "Whitelist all servers", "option.NoChatReports.whitelistAllServers.tooltip": "Makes the mod behave as if all servers were added to §oWhitelisted Servers§r list.", + + "configuration.NoChatReports.category.whitelistedServers": "Whitelisted Servers", + "option.NoChatReports.whitelistedServers": "Whitelisted Servers", "option.NoChatReports.whitelistedServers.tooltip": "Contains servers for which \"Unsafe Server\" warning screen should never display. Servers are added to this list automatically when you check \"Do not show again for this server\" box in that screen.\nEach entry is a string that is formatted as §l:§r.", "option.NoChatReports.whitelistedServers.addButtonTooltip": "Add server", "option.NoChatReports.whitelistedServers.removeButtonTooltip": "Remove server", "option.NoChatReports.whitelistedServers.instructions": "Click the + to add a server. Click the - to remove the selected server.", - "option.NoChatReports.whitelistedServers.serverAddress": "Click here to edit server address" + "option.NoChatReports.whitelistedServers.serverAddress": "Click here to edit server address", + + "configuration.NoChatReports.category.lanOptions": "LAN Options", + + "option.NoChatReports.demandOnClient": "Demand on client", + "option.NoChatReports.demandOnClient.tooltip": "Makes the server require all joining clients to have No Chat Reports installed.", + "option.NoChatReports.convertToGameMessage": "Convert to game message", + "option.NoChatReports.convertToGameMessage.tooltip": "Makes the server convert all player messages into system messages. System messages don't have any signatures attached and cannot be reported; on unmodified clients they will display with gray bar to the left.", + "option.NoChatReports.addQueryData": "Add query data", + "option.NoChatReports.addQueryData.tooltip": "Allows the server to send additional data to client when handling pings. This is used for displaying \"Safe Server\" icon, as well as some other technical purposes." } \ No newline at end of file -- cgit v1.2.3 From 3e177e9d3e1ffae37f4f9476dd21a52227c9b052 Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Sat, 27 Aug 2022 17:05:24 -0400 Subject: modify verifiable int sliders --- .../java/com/aizistral/nochatreports/config/ModMenuIntegration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java index 4e949bc..2b6d3f9 100644 --- a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java @@ -80,14 +80,14 @@ public final class ModMenuIntegration implements ModMenuApi { .build()); // Set an option for verifiedIconOffsetX - visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetX"), NCRConfig.getClient().verifiedIconOffsetX, 0, 10) + visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetX"), NCRConfig.getClient().verifiedIconOffsetX, -5, 5) .setDefaultValue(0) .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconOffsetX.tooltip")) .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconOffsetX = newValue) .build()); // Set an option for verifiedIconOffsetY - visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetY"), NCRConfig.getClient().verifiedIconOffsetY, 0, 10) + visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetY"), NCRConfig.getClient().verifiedIconOffsetY, -5, 5) .setDefaultValue(0) .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconOffsetY.tooltip")) .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconOffsetY = newValue) -- cgit v1.2.3 From 89ccf76cf095f368e7ed5869c2b4380232bf8f68 Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Sat, 27 Aug 2022 17:11:39 -0400 Subject: fix some grammar and stuff --- src/main/resources/assets/nochatreports/lang/en_us.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/resources/assets/nochatreports/lang/en_us.json b/src/main/resources/assets/nochatreports/lang/en_us.json index d0b57be..3415f96 100644 --- a/src/main/resources/assets/nochatreports/lang/en_us.json +++ b/src/main/resources/assets/nochatreports/lang/en_us.json @@ -47,7 +47,7 @@ "option.NoChatReports.disableTelemetry": "Disable telemetry", "option.NoChatReports.disableTelemetry.tooltip": "Allows the mod to disable built-in telemetry, similar to how No Telemetry does.", "option.NoChatReports.showReloadButton": "Show reload button", - "option.NoChatReports.showReloadButton.tooltip": "Adds a button for config reloading to Multiplayer menu.", + "option.NoChatReports.showReloadButton.tooltip": "Adds a button for config reloading to multiplayer menu.", "option.NoChatReports.whitelistAllServers": "Whitelist all servers", "option.NoChatReports.whitelistAllServers.tooltip": "Makes the mod behave as if all servers were added to §oWhitelisted Servers§r list.", @@ -56,7 +56,7 @@ "option.NoChatReports.whitelistedServers": "Whitelisted Servers", "option.NoChatReports.whitelistedServers.tooltip": "Contains servers for which \"Unsafe Server\" warning screen should never display. Servers are added to this list automatically when you check \"Do not show again for this server\" box in that screen.\nEach entry is a string that is formatted as §l:§r.", "option.NoChatReports.whitelistedServers.addButtonTooltip": "Add server", - "option.NoChatReports.whitelistedServers.removeButtonTooltip": "Remove server", + "option.NoChatReports.whitelistedServers.removeButtonTooltip": "Remove selected server", "option.NoChatReports.whitelistedServers.instructions": "Click the + to add a server. Click the - to remove the selected server.", "option.NoChatReports.whitelistedServers.serverAddress": "Click here to edit server address", -- cgit v1.2.3 From 8dbbb1fd68939f8c1238c40ba05b83223d51ffaf Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Sun, 28 Aug 2022 16:39:31 -0400 Subject: hopefully fix my discarded changes --- .../java/com/aizistral/nochatreports/config/ModMenuIntegration.java | 2 +- src/main/resources/assets/nochatreports/lang/en_us.json | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java index 2b6d3f9..f48fb31 100644 --- a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java @@ -206,4 +206,4 @@ public final class ModMenuIntegration implements ModMenuApi { }; } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/nochatreports/lang/en_us.json b/src/main/resources/assets/nochatreports/lang/en_us.json index 351751c..e50f25e 100644 --- a/src/main/resources/assets/nochatreports/lang/en_us.json +++ b/src/main/resources/assets/nochatreports/lang/en_us.json @@ -58,7 +58,6 @@ "option.NoChatReports.whitelistedServers.addButtonTooltip": "Add server", "option.NoChatReports.whitelistedServers.removeButtonTooltip": "Remove selected server", "option.NoChatReports.whitelistedServers.instructions": "Click the + to add a server. Click the - to remove the selected server.", -<<<<<<< HEAD "option.NoChatReports.whitelistedServers.serverAddress": "Click here to edit server address", "configuration.NoChatReports.category.lanOptions": "LAN Options", @@ -70,7 +69,3 @@ "option.NoChatReports.addQueryData": "Add query data", "option.NoChatReports.addQueryData.tooltip": "Allows the server to send additional data to client when handling pings. This is used for displaying \"Safe Server\" icon, as well as some other technical purposes." } -======= - "option.NoChatReports.whitelistedServers.serverAddress": "Click here to edit server address" -} ->>>>>>> b866000650d995a1095aaf5ccbd4b855df6bc9d1 -- cgit v1.2.3 From 0df0dbe44a3a84f30a5f5164fab3cab02fafb029 Mon Sep 17 00:00:00 2001 From: Aizistral Date: Mon, 29 Aug 2022 12:31:55 +0200 Subject: Allow third-party software to mark servers as secure --- .../java/com/aizistral/nochatreports/NoChatReportsClient.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java b/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java index 62c4185..df919d2 100644 --- a/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java +++ b/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java @@ -3,6 +3,7 @@ package com.aizistral.nochatreports; import java.util.List; import com.aizistral.nochatreports.config.NCRConfig; +import com.aizistral.nochatreports.core.ServerDataExtension; import com.aizistral.nochatreports.core.ServerSafetyLevel; import com.aizistral.nochatreports.core.ServerSafetyState; import com.aizistral.nochatreports.gui.UnsafeServerScreen; @@ -96,9 +97,15 @@ public final class NoChatReportsClient implements ClientModInitializer { if (canSend) { ServerSafetyState.updateCurrent(ServerSafetyLevel.SECURE); + } else if (ServerSafetyState.forceSignedMessages()) { + ServerSafetyState.updateCurrent(ServerSafetyLevel.INSECURE); } else { - ServerSafetyState.updateCurrent(ServerSafetyState.forceSignedMessages() ? - ServerSafetyLevel.INSECURE : ServerSafetyLevel.UNINTRUSIVE); + if (ServerSafetyState.getLastServerData() instanceof ServerDataExtension ext + && ext.preventsChatReports()) { + ServerSafetyState.updateCurrent(ServerSafetyLevel.SECURE); + } else { + ServerSafetyState.updateCurrent(ServerSafetyLevel.UNINTRUSIVE); + } } } -- cgit v1.2.3 From e08b0a3cd401685d42050a5594abe8c5b4afc0a1 Mon Sep 17 00:00:00 2001 From: Aizistral Date: Mon, 29 Aug 2022 12:37:32 +0200 Subject: Revert "Allow third-party software to mark servers as secure" This reverts commit 0df0dbe44a3a84f30a5f5164fab3cab02fafb029. --- .../java/com/aizistral/nochatreports/NoChatReportsClient.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java b/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java index df919d2..62c4185 100644 --- a/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java +++ b/src/main/java/com/aizistral/nochatreports/NoChatReportsClient.java @@ -3,7 +3,6 @@ package com.aizistral.nochatreports; import java.util.List; import com.aizistral.nochatreports.config.NCRConfig; -import com.aizistral.nochatreports.core.ServerDataExtension; import com.aizistral.nochatreports.core.ServerSafetyLevel; import com.aizistral.nochatreports.core.ServerSafetyState; import com.aizistral.nochatreports.gui.UnsafeServerScreen; @@ -97,15 +96,9 @@ public final class NoChatReportsClient implements ClientModInitializer { if (canSend) { ServerSafetyState.updateCurrent(ServerSafetyLevel.SECURE); - } else if (ServerSafetyState.forceSignedMessages()) { - ServerSafetyState.updateCurrent(ServerSafetyLevel.INSECURE); } else { - if (ServerSafetyState.getLastServerData() instanceof ServerDataExtension ext - && ext.preventsChatReports()) { - ServerSafetyState.updateCurrent(ServerSafetyLevel.SECURE); - } else { - ServerSafetyState.updateCurrent(ServerSafetyLevel.UNINTRUSIVE); - } + ServerSafetyState.updateCurrent(ServerSafetyState.forceSignedMessages() ? + ServerSafetyLevel.INSECURE : ServerSafetyLevel.UNINTRUSIVE); } } -- cgit v1.2.3 From 2203b40801d9735c4b2bfd1a1dfc6e3e9576efc1 Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Mon, 29 Aug 2022 15:07:09 -0400 Subject: make -10 and 10 for int sliders and add f4302a --- .../java/com/aizistral/nochatreports/config/ModMenuIntegration.java | 4 ++-- .../aizistral/nochatreports/mixins/client/MixinOnlineServerEntry.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java index f48fb31..0d92176 100644 --- a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java @@ -80,14 +80,14 @@ public final class ModMenuIntegration implements ModMenuApi { .build()); // Set an option for verifiedIconOffsetX - visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetX"), NCRConfig.getClient().verifiedIconOffsetX, -5, 5) + visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetX"), NCRConfig.getClient().verifiedIconOffsetX, -10, 10) .setDefaultValue(0) .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconOffsetX.tooltip")) .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconOffsetX = newValue) .build()); // Set an option for verifiedIconOffsetY - visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetY"), NCRConfig.getClient().verifiedIconOffsetY, -5, 5) + visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetY"), NCRConfig.getClient().verifiedIconOffsetY, -10, 10) .setDefaultValue(0) .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconOffsetY.tooltip")) .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconOffsetY = newValue) diff --git a/src/main/java/com/aizistral/nochatreports/mixins/client/MixinOnlineServerEntry.java b/src/main/java/com/aizistral/nochatreports/mixins/client/MixinOnlineServerEntry.java index 9354e7e..5090b6c 100644 --- a/src/main/java/com/aizistral/nochatreports/mixins/client/MixinOnlineServerEntry.java +++ b/src/main/java/com/aizistral/nochatreports/mixins/client/MixinOnlineServerEntry.java @@ -46,7 +46,7 @@ public abstract class MixinOnlineServerEntry extends ServerSelectionList.Entry { if (!NCRConfig.getClient().verifiedIconEnabled()) return; - if (this.serverData.ping > 0 && ((ServerDataExtension) this.serverData).preventsChatReports()) { + if (this.serverData.ping >= 0 && ((ServerDataExtension) this.serverData).preventsChatReports()) { int xOffset = NCRConfig.getClient().getVerifiedIconOffsetX(), yOffset = NCRConfig.getClient().getVerifiedIconOffsetY(); -- cgit v1.2.3 From b0d4e2f88c57a24994113febb27319ab3f6973e1 Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Mon, 29 Aug 2022 16:53:46 -0400 Subject: change to int field --- .../java/com/aizistral/nochatreports/config/ModMenuIntegration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java index 0d92176..8a18f3d 100644 --- a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java @@ -80,14 +80,14 @@ public final class ModMenuIntegration implements ModMenuApi { .build()); // Set an option for verifiedIconOffsetX - visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetX"), NCRConfig.getClient().verifiedIconOffsetX, -10, 10) + visual.addEntry(entryBuilder.startIntField(Component.translatable("option.NoChatReports.verifiedIconOffsetX"), NCRConfig.getClient().verifiedIconOffsetX) .setDefaultValue(0) .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconOffsetX.tooltip")) .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconOffsetX = newValue) .build()); // Set an option for verifiedIconOffsetY - visual.addEntry(entryBuilder.startIntSlider(Component.translatable("option.NoChatReports.verifiedIconOffsetY"), NCRConfig.getClient().verifiedIconOffsetY, -10, 10) + visual.addEntry(entryBuilder.startIntField(Component.translatable("option.NoChatReports.verifiedIconOffsetY"), NCRConfig.getClient().verifiedIconOffsetY) .setDefaultValue(0) .setTooltip(this.makeTooltip("option.NoChatReports.verifiedIconOffsetY.tooltip")) .setSaveConsumer(newValue -> NCRConfig.getClient().verifiedIconOffsetY = newValue) -- cgit v1.2.3 From 14de66a328c9f88058b1adcb1111cba40e8dc2f1 Mon Sep 17 00:00:00 2001 From: Aizistral Date: Tue, 30 Aug 2022 12:11:28 +0200 Subject: Rename some options --- src/main/resources/assets/nochatreports/lang/en_us.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/resources/assets/nochatreports/lang/en_us.json b/src/main/resources/assets/nochatreports/lang/en_us.json index e50f25e..9a6c84d 100644 --- a/src/main/resources/assets/nochatreports/lang/en_us.json +++ b/src/main/resources/assets/nochatreports/lang/en_us.json @@ -23,9 +23,9 @@ "option.NoChatReports.showServerSafety.moreInfo": "§bClick here to read more about server safety levels", "option.NoChatReports.verifiedIconEnabled": "Verified icon enabled", "option.NoChatReports.verifiedIconEnabled.tooltip": "Allows the mod to display special icon in multiplayer menu for servers that have No Chat Reports or some other anti-chat-reporting measures installed.", - "option.NoChatReports.verifiedIconOffsetX": "Verified icon offset X", + "option.NoChatReports.verifiedIconOffsetX": "Verified icon X-offset", "option.NoChatReports.verifiedIconOffsetX.tooltip": "Defines X-axis offset for rendering of \"Safe Server\" icon.", - "option.NoChatReports.verifiedIconOffsetY": "Verified icon offset Y", + "option.NoChatReports.verifiedIconOffsetY": "Verified icon Y-offset", "option.NoChatReports.verifiedIconOffsetY.tooltip": "Defines Y-axis offset for rendering of \"Safe Server\" icon.", "option.NoChatReports.hideRedChatIndicators": "Hide red chat indicators", "option.NoChatReports.hideRedChatIndicators.tooltip": "Prevents the client from displaying \"Not Secure\" indicators, in the form of red bar to the left and §c§l(§r§c!§c§l)§r icon to the right of chat message.", -- cgit v1.2.3