Convert Itemban.HasPermission to check if user has Permission.usebanneditem and remove redundant checks elsewhere.
This commit is contained in:
parent
7720380b09
commit
4c5c2ba0de
3 changed files with 14 additions and 17 deletions
|
|
@ -200,6 +200,10 @@ namespace TShockAPI.DB
|
|||
{
|
||||
if (ply == null)
|
||||
return false;
|
||||
|
||||
if (ply.Group.HasPermission(Permissions.usebanneditem))
|
||||
return true;
|
||||
|
||||
var cur = ply.Group;
|
||||
var traversed = new List<Group>();
|
||||
while (cur != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue