summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/aizistral/nochatreports
diff options
context:
space:
mode:
authorMODKILLER10012022-08-27 16:11:18 -0400
committerMODKILLER10012022-08-27 16:11:18 -0400
commit8915660ed6c28d2754aa53ad5e0869234a83e1da (patch)
treef9bf9fbd96c81918d9d33c6c5465469ecc5166d5 /src/main/java/com/aizistral/nochatreports
parentdffdc3b65f3643192cb08cbfa3d05067ebcd9f30 (diff)
Add lan options and verified server options
Diffstat (limited to 'src/main/java/com/aizistral/nochatreports')
-rw-r--r--src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java52
1 files changed, 43 insertions, 9 deletions
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();