protected override void Load()
        {
            Instance = this;

            ValidGroups = Configuration.Instance.Groups;

            foreach (DutyGroups Group in ValidGroups.ToList())
            {
                RocketPermissionsGroup g = R.Permissions.GetGroup(Group.GroupID);
                if (g == null)
                {
                    Logger.LogWarning("Permission group " + Group.GroupID + " does not exist! No command related to that group will execute.");
                    ValidGroups.Remove(Group);
                }
            }


            Logger.LogWarning("Loading event \"Player Connected\"...");
            U.Events.OnPlayerConnected += PlayerConnected;
            Logger.LogWarning("Loading event \"Player Disconnected\"...");
            U.Events.OnPlayerDisconnected += PlayerDisconnected;

            Logger.LogWarning("");
            Logger.LogWarning("Duty has been successfully loaded!");
        }
Exemple #2
0
        protected override void Unload()
        {
            Instance = null;

            Rocket.Core.Logging.Logger.LogWarning("Unloading on player connect event...");
            U.Events.OnPlayerConnected -= PlayerConnected;
            Rocket.Core.Logging.Logger.LogWarning("Unloading on player disconnect event...");
            U.Events.OnPlayerConnected -= PlayerDisconnected;

            Rocket.Core.Logging.Logger.LogWarning("");
            Rocket.Core.Logging.Logger.LogWarning("Duty has been unloaded!");
        }
Exemple #3
0
        protected override void Load()
        {
            Instance = this;

            Rocket.Core.Logging.Logger.LogWarning("Loading event \"Player Connected\"...");
            U.Events.OnPlayerConnected += PlayerConnected;
            Rocket.Core.Logging.Logger.LogWarning("Loading event \"Player Disconnected\"...");
            U.Events.OnPlayerDisconnected += PlayerDisconnected;

            Rocket.Core.Logging.Logger.LogWarning("");
            Rocket.Core.Logging.Logger.LogWarning("Duty has been successfully loaded!");
        }