예제 #1
0
        protected override void Load()
        {
            base.Load();
            Instance = this;

            Logger.LogWarning(" Loading BanOnDeath by Mr.Kwabs.");

            Logger.LogWarning($"\n Ban Length: {Configuration.Instance.BanLengthSeconds} Seconds");
            Logger.LogWarning($"\n Ban Reason: '{Configuration.Instance.BanReason}' \n");

            if (Configuration.Instance.OnlyBanOnSuicide)
            {
                Logger.LogWarning(" Only Ban on Suicide: Enabled");
            }
            else
            {
                Logger.LogError(" Only Ban on Suicide: Disabled");
            }
            Logger.LogWarning("\n BanOnDeath by Mr.Kwabs has successfully loaded.");

            UnturnedPlayerEvents.OnPlayerDeath += OnPlayerDeath;
        }
예제 #2
0
 protected override void Unload()
 {
     UnturnedPlayerEvents.OnPlayerDeath -= OnPlayerDeath;
     base.Unload();
     Instance = null;
 }