From 4c8deaafb7e3c65d7ad9d0ee6c0820dca012cf4e Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Tue, 16 Aug 2022 00:45:34 -0400 Subject: Fixed en_us config settings, ready to merge in my opinion. --- src/main/java/com/aizistral/nochatreports/ModMenuIntegration.java | 6 ++++++ .../java/com/aizistral/nochatreports/core/NoReportsConfig.java | 7 +++---- src/main/resources/assets/nochatreports/lang/en_us.json | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/main/java/com/aizistral/nochatreports/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/ModMenuIntegration.java index aa9cdc5..c0fada4 100644 --- a/src/main/java/com/aizistral/nochatreports/ModMenuIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/ModMenuIntegration.java @@ -12,6 +12,12 @@ import net.minecraft.network.chat.ClickEvent; import net.minecraft.network.chat.HoverEvent; import net.minecraft.network.chat.Component; +/** + * Implementation of ModMenu and ClothConfig support for the mod. + * + * @author MODKILLER1001 + */ + public class ModMenuIntegration implements ModMenuApi { @Override diff --git a/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java b/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java index 76930af..cf3ee70 100644 --- a/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java +++ b/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java @@ -36,8 +36,7 @@ import net.minecraft.util.Tuple; */ public class NoReportsConfig { - - public static final Path CONFIG_FILE = FabricLoader.getInstance().getConfigDir().resolve("NoChatReports.json"); + private static final Path CONFIG_FILE = FabricLoader.getInstance().getConfigDir().resolve("NoChatReports.json"); private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); private static NoReportsConfig INSTANCE; public boolean demandOnClient = true, demandOnServer = false, enableDebugLog = false, @@ -87,7 +86,7 @@ public class NoReportsConfig { } @Nullable - public static NoReportsConfig readFile() { + private static NoReportsConfig readFile() { if (!Files.isRegularFile(CONFIG_FILE)) return null; @@ -98,7 +97,7 @@ public class NoReportsConfig { } } - public static void writeFile(NoReportsConfig instance) { + private static void writeFile(NoReportsConfig instance) { try (BufferedWriter writer = Files.newBufferedWriter(CONFIG_FILE)) { GSON.toJson(instance, writer); } catch (Exception ex) { diff --git a/src/main/resources/assets/nochatreports/lang/en_us.json b/src/main/resources/assets/nochatreports/lang/en_us.json index 8f94a0f..b479e84 100644 --- a/src/main/resources/assets/nochatreports/lang/en_us.json +++ b/src/main/resources/assets/nochatreports/lang/en_us.json @@ -24,7 +24,7 @@ "option.NoChatReports.convertToGameMessage.tooltip": "Makes the server convert all player messages into system\nmessages. System messages don't have any signatures\nattached and cannot be reported; on unmodified clients\nthey will display with gray bar to the left.", "option.NoChatReports.showServerSafety":"Show server safety", "option.NoChatReports.showServerSafety.tooltip":"Allows the client to display server safety status in\nbottom-right corner of chat screen. The icon is\nhoverable for additional information:", - "option.NoChatReports.showServerSafety.currentSafetyLevels":"More information on safety levels here", + "option.NoChatReports.showServerSafety.currentSafetyLevels":"More information on server safety levels linked here", "option.NoChatReports.hideRedChatIndicators":"Hide red chat indicators", "option.NoChatReports.hideRedChatIndicators.tooltip":"Prevents the client from displaying \"Not Secure\"\nindicators, in the form of red bar to the left\nand §c§l(§r§c!§c§l)§r icon to the right of chat message.", "option.NoChatReports.hideYellowChatIndicators":"Hide yellow chat indicators", -- cgit v1.2.3