Ejemplo n.º 1
0
        public override void Unload(bool shutdown)
        {
            SentCustomModels.Clear();
            ModelNameToIdForPlayer.Clear();

            OnPlayerConnectEvent.Unregister(OnPlayerConnect);
            OnPlayerDisconnectEvent.Unregister(OnPlayerDisconnect);
            OnJoiningLevelEvent.Unregister(OnJoiningLevel);
            OnJoinedLevelEvent.Unregister(OnJoinedLevel);
            OnSendingModelEvent.Unregister(OnSendingModel);
            OnPlayerCommandEvent.Unregister(OnPlayerCommand);
            // OnEntitySpawnedEvent.Unregister(OnEntitySpawned);

            if (command != null)
            {
                Command.Unregister(command);
                command = null;
            }
        }
Ejemplo n.º 2
0
        public override void Unload(bool shutdown)
        {
            if (dc != null)
            {
                dc.Dispose();
            }
            if (!registered)
            {
                return;
            }
            OnPlayerConnectEvent.Unregister(PlayerConnect);
            OnPlayerDisconnectEvent.Unregister(PlayerDisconnect);
            OnPlayerChatEvent.Unregister(PlayerChat);
            OnPlayerCommandEvent.Unregister(PlayerCommand);

            OnMessageReceivedEvent.Unregister(DiscordMessage);

            Command.Unregister(Command.Find("DiscordBot"));
        }