diff --git a/Allowlist.cs b/Allowlist.cs index d5fc7ff..297726b 100644 --- a/Allowlist.cs +++ b/Allowlist.cs @@ -143,7 +143,7 @@ public bool Delete(string Player) List? list = JsonConvert.DeserializeObject>(Read()); int n = 0; if (list == null || list.Count == 0) - logger.error.WriteLine("白名单为空,无法删除!"); + logger.Error.WriteLine("白名单为空,无法删除!"); else { foreach (var item in list) diff --git a/Events.cs b/Events.cs index edce415..2ba6da6 100644 --- a/Events.cs +++ b/Events.cs @@ -14,10 +14,10 @@ public void ServerStrated(Version version) //服务器开启后执行的 ServerStartedEvent.Subscribe(e => { - logger.info.WriteLine("FantasyTownAllowlist is loaded!"); - logger.info.WriteLine("FantasyTownAllowlist已加载!"); - logger.info.WriteLine("Plugin version: " + version.ToString()); - logger.info.WriteLine("插件版本:" + version.ToString()); + logger.Info.WriteLine("FantasyTownAllowlist is loaded!"); + logger.Info.WriteLine("FantasyTownAllowlist已加载!"); + logger.Info.WriteLine("Plugin version: " + version.ToString()); + logger.Info.WriteLine("插件版本:" + version.ToString()); if (File.Exists(OldFile) == false && File.Exists(FilePath) == false) { logger.Info.WriteLine("检测到白名单文件不存在,正在创建……"); diff --git a/FantasyTownAllowlist.csproj b/FantasyTownAllowlist.csproj index 4f6f052..5a8987a 100644 --- a/FantasyTownAllowlist.csproj +++ b/FantasyTownAllowlist.csproj @@ -37,13 +37,17 @@ embedded + + + + - ..\LiteLoader\LiteLoader.NET.dll + ..\.lib\SDK-dotnet\LiteLoader\LiteLoader.NET.dll diff --git a/RegCommand.cs b/RegCommand.cs index 6089ee9..5bc6ca4 100644 --- a/RegCommand.cs +++ b/RegCommand.cs @@ -13,8 +13,8 @@ internal class RegCommand Allowlist allowlistMgr = new(); public void CommandRegisiter() { - logger.info.WriteLine("Registering Commands..."); - logger.info.WriteLine("正在注册命令……"); + logger.Info.WriteLine("Registering Commands..."); + logger.Info.WriteLine("正在注册命令……"); var AllowlistOperate = cmd.SetEnum("Operate Allowlist", new() { "add", "remove" }); //增删操作指令枚举 var Allowlister = cmd.SetEnum("List the player in the Allowlist", new() { "list" }); //列出白名单指令枚举 //设置指令参数 @@ -85,8 +85,8 @@ public void CommandRegisiter() else pln += $", {item.Name}"; } } - logger.info.WriteLine("There are players in allowlist:"); - logger.info.WriteLine(pln); + logger.Info.WriteLine("There are players in allowlist:"); + logger.Info.WriteLine(pln); } break; default: @@ -95,17 +95,17 @@ public void CommandRegisiter() } catch (Exception e) { - logger.error.WriteLine(e.Message); - logger.error.WriteLine(e.Source); - logger.error.WriteLine(e.StackTrace); + logger.Error.WriteLine(e.Message); + logger.Error.WriteLine(e.Source); + logger.Error.WriteLine(e.StackTrace); throw; } } - else logger.error.WriteLine("results is null or empty!"); + else logger.Error.WriteLine("results is null or empty!"); }); Setup(cmd); - logger.info.WriteLine("Commands Registered!"); - logger.info.WriteLine("命令注册成功!"); + logger.Info.WriteLine("Commands Registered!"); + logger.Info.WriteLine("命令注册成功!"); } } }