From 48184ef06e2c4d524f71885104416526ba8233d3 Mon Sep 17 00:00:00 2001 From: Coloryr <402067010@qq.com> Date: Mon, 15 Jul 2024 22:22:04 +0800 Subject: [PATCH] Update GuiConfigUtils.cs --- src/ColorMC.Gui/Utils/GuiConfigUtils.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ColorMC.Gui/Utils/GuiConfigUtils.cs b/src/ColorMC.Gui/Utils/GuiConfigUtils.cs index 145b92120..d4b7cf2c9 100644 --- a/src/ColorMC.Gui/Utils/GuiConfigUtils.cs +++ b/src/ColorMC.Gui/Utils/GuiConfigUtils.cs @@ -69,6 +69,11 @@ public static bool Load(string local, bool quit = false) Config.ServerCustom = MakeServerCustomConfig(); save = true; } + if (Config.ServerCustom.LockLogins == null) + { + Config.ServerCustom.LockLogins = []; + save = true; + } if (Config.Render == null || Config.Render.Windows == null || Config.Render.X11 == null) @@ -211,7 +216,8 @@ public static ServerCustomSetting MakeServerCustomConfig() { MotdColor = "White", MotdBackColor = "Black", - Volume = 30 + Volume = 30, + LockLogins = [] }; }