/// <inheritdoc /> public override void LoadData() { if (!MyAPIGateway.Multiplayer.MultiplayerActive || !MyAPIGateway.Utilities.IsDedicated) { LoadLocalization(); LoadSettings(); ModifyDefinitions(); MyAPIGateway.Gui.GuiControlRemoved += OnGuiControlRemoved; _chatHandler = new ChatHandler(); _guiHandler = new GuiHandler(); } }
/// <inheritdoc /> protected override void UnloadData() { if (!MyAPIGateway.Multiplayer.MultiplayerActive || !MyAPIGateway.Utilities.IsDedicated) { MyAPIGateway.Gui.GuiControlRemoved -= OnGuiControlRemoved; if (_guiHandler != null) { _guiHandler.Close(); _guiHandler = null; } if (_chatHandler != null) { _chatHandler.Close(); _chatHandler = null; } RevertDefinitions(); } Static = null; }