diff options
| author | MODKILLER1001 | 2022-08-20 07:38:46 -0400 |
|---|---|---|
| committer | MODKILLER1001 | 2022-08-20 07:38:46 -0400 |
| commit | 3e9a9e97280164c4273bbf16639ab9cb3cc6609b (patch) | |
| tree | 5c0b8e143dbcab4cef32a7f47a0107406c28c8ea /src/main/java/com/aizistral | |
| parent | ac40009ad35e83fbb6d0c005ef2573b962682f56 (diff) | |
add default server to whitelisted server menu
Diffstat (limited to 'src/main/java/com/aizistral')
| -rw-r--r-- | src/main/java/com/aizistral/nochatreports/config/ModMenuIntegration.java | 5 |
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")) |
