Ejemplo n.º 1
0
 private void onPlayerConnected(UnturnedPlayer player)
 {
     if (Instance.Configuration.Instance.BanArrestedOnReconnect)
     {
         if (Prison.IsPlayerContains(player.CSteamID))
         {
             player.Ban($"{Instance.Configuration.Instance.BanArrestedReasonOnReconnect}", Instance.Configuration.Instance.BanDurationOnReconnect);
         }
     }
 }
Ejemplo n.º 2
0
 private void DeathBan(UnturnedPlayer player)
 {
     if (!player.HasPermission("banondeath.ignore"))
     {
         player.Ban(Configuration.Instance.BanReason, Configuration.Instance.BanLengthSeconds);
         Logger.LogWarning($"{player.DisplayName} [{player.Id}] has been banned for {Configuration.Instance.BanLengthSeconds} seconds for dying!");
     }
     else
     {
         Logger.LogWarning("Ignoring Death...");
     }
 }