protected override void Unload() { UnturnedPlayerEvents.OnPlayerChatted -= this.OnPlayerChatted; this.Logger = null; CommandLoggerCore.Instance = null; }
protected override void Load() { CommandLoggerCore.Instance = this; this.Logger = new CommandLoggerLogger(); RocketLogger.LogWarning("[CommandLogger] Made by: Coolpuppy24"); RocketLogger.LogWarning("[CommandLogger] Fork by: Wisser Tg"); RocketLogger.LogWarning("----------------------------------------------"); foreach (CommandLoggerEntry entry in this.Configuration.Instance.Entries) { RocketLogger.LogWarning($"[CommandLogger] Registered logger command {entry.Name}" + (entry.Aliases != null && entry.Aliases.Length > 0 ? $" with {string.Join(", ", entry.GetAliases())}" : "")); } UnturnedPlayerEvents.OnPlayerChatted += this.OnPlayerChatted; }