Move Utils.Ban -> TSPlayer.Ban.

Arguably, this is one of the more controversial methods that's being
kept. Because it kicks and bans a target player, it's more useful than
removing it and requiring people to interface with the TShock Ban
Manager directly (not a good move for the future). Whether or not this
method sucks is up for debate, but right now I think it's totally fine
to keep it around in a different location.
This commit is contained in:
Lucas Nicodemus 2017-12-29 07:58:32 -07:00
parent a5a3aae599
commit 152c67f27c
4 changed files with 30 additions and 31 deletions

View file

@ -2384,7 +2384,7 @@ namespace TShockAPI
{
if (TShock.Config.BanOnHardcoreDeath)
{
if (!TShock.Utils.Ban(args.Player, TShock.Config.HardcoreBanReason, false, "hardcore-death"))
if (!args.Player.Ban(TShock.Config.HardcoreBanReason, false, "hardcore-death"))
args.Player.Kick("You died! Normally, you'd be banned.", true, true);
}
else
@ -2448,7 +2448,7 @@ namespace TShockAPI
{
if (TShock.Config.BanOnMediumcoreDeath)
{
if (!TShock.Utils.Ban(args.Player, TShock.Config.MediumcoreBanReason, false, "mediumcore-death"))
if (!args.Player.Ban(TShock.Config.MediumcoreBanReason, false, "mediumcore-death"))
args.Player.Kick("You died! Normally, you'd be banned.", true, true);
}
else