Moved item ban checking into the PlayerSlot handler. Still has the issue of kicking the person too early though.
This commit is contained in:
parent
258b7d48fb
commit
ad664bfcca
4 changed files with 27 additions and 29 deletions
|
|
@ -375,20 +375,6 @@ namespace TShockAPI
|
|||
player.TilesDestroyed.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (!player.Group.HasPermission("usebanneditem"))
|
||||
{
|
||||
var inv = player.TPlayer.inventory;
|
||||
|
||||
for (int i = 0; i < inv.Length; i++)
|
||||
{
|
||||
if (inv[i] != null && Itembans.ItemIsBanned(inv[i].name))
|
||||
{
|
||||
player.Disconnect("Using banned item: " + inv[i].name + ", remove it and rejoin");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue