Example #1
0
 protected override void Load()
 {
     Instance = this;
     if (!Configuration.Instance.Enabled)
     {
         Logger.Log("The plugin is disabled via the config file!");
         base.UnloadPlugin();
         return;
     }
     Logger.Log("Plugin Loaded!\r\nCreated by xXThe_HunterXx\r\nHave Fun! :)");
     UnturnedPlayerEvents.OnPlayerDeath += OnPlayerDeath;
 }
Example #2
0
        protected override void Load()
        {
            Instance = this;
            if (!Configuration.Instance.Enabled)
            {
                Rocket.Core.Logging.Logger.Log("The plugin is disabled via the config file!");
                base.UnloadPlugin();
                return;
            }
            Rocket.Core.Logging.Logger.Log("Plugin Loaded!\r\nCreated by xXThe_HunterXx\r\nHave Fun! :)");

            Rocket.Core.Logging.Logger.Log("Checking Configuration...");

            if (Configuration.Instance.EffectsOnConnect)
            {
                Rocket.Core.Logging.Logger.Log("Effects on Connect Enabled!");
            }
            else
            {
                Rocket.Core.Logging.Logger.Log("Effects on Connect Disabled!");
            }

            if (Configuration.Instance.EffectsOnDisconnect)
            {
                Rocket.Core.Logging.Logger.Log("Effects on Disconnect Enabled!");
            }
            else
            {
                Rocket.Core.Logging.Logger.Log("Effects on Disconnect Disabled!");
            }


            UnturnedPlayerEvents.OnPlayerDeath += OnPlayerDeath;
            U.Events.OnPlayerConnected         += OnPlayerConnected;
            U.Events.OnPlayerDisconnected      += OnPlayerDisconnected;
        }