Moved item ban checking into the PlayerSlot handler. Still has the issue of kicking the person too early though.

This commit is contained in:
high 2011-08-13 12:50:53 -04:00
parent 258b7d48fb
commit ad664bfcca
4 changed files with 27 additions and 29 deletions

View file

@ -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;
}
}
}
}
}
}