Pass down the permission being checked to the EventArgs (thanks @white)
This commit is contained in:
parent
aa419283a9
commit
81fff9bd66
2 changed files with 12 additions and 5 deletions
|
|
@ -963,7 +963,7 @@ namespace TShockAPI
|
|||
/// <returns>True if the player has that permission.</returns>
|
||||
public bool HasPermission(string permission)
|
||||
{
|
||||
if (PlayerHooks.OnPlayerPermission(this))
|
||||
if (PlayerHooks.OnPlayerPermission(this, permission))
|
||||
return true;
|
||||
|
||||
return (tempGroup != null && tempGroup.HasPermission(permission)) || Group.HasPermission(permission);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue