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:
parent
a5a3aae599
commit
152c67f27c
4 changed files with 30 additions and 31 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue