summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMODKILLER10012022-08-20 07:38:46 -0400
committerMODKILLER10012022-08-20 07:38:46 -0400
commit3e9a9e97280164c4273bbf16639ab9cb3cc6609b (patch)
tree5c0b8e143dbcab4cef32a7f47a0107406c28c8ea /src
parentac40009ad35e83fbb6d0c005ef2573b962682f56 (diff)
add default server to whitelisted server menu
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java
index b2948c1..13f4963 100644
--- a/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java
+++ b/src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java
@@ -1,5 +1,6 @@
package com.aizistral.nochatreports.config;
+import java.util.ArrayList;
import java.util.List;
import com.aizistral.nochatreports.gui.FontHelper;
@@ -42,6 +43,9 @@ public class ModMenuIntegration implements ModMenuApi {
return tooltip;
}
+ private static final ArrayList<String> DEFAULT_SERVER_ADD = new ArrayList<>(List.of(
+ "mc.example.com"));
+
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return screen -> {
@@ -155,6 +159,7 @@ public class ModMenuIntegration implements ModMenuApi {
// Add or remove whitelisted servers
whitelistedServers.addEntry(entryBuilder.startStrList(Component.translatable("option.NoChatReports.whitelistedServers"), NoReportsConfig.getInstance().whitelistedServers)
.setExpanded(true)
+ .setDefaultValue(DEFAULT_SERVER_ADD)
.setInsertInFront(true)
.setTooltip(this.makeTooltip("option.NoChatReports.whitelistedServers.tooltip"))
.setAddButtonTooltip(Component.translatable("option.NoChatReports.whitelistedServers.addButtonTooltip"))