Pass down the permission being checked to the EventArgs (thanks @white)

This commit is contained in:
Enerdy 2016-01-11 22:34:22 +00:00
parent aa419283a9
commit 81fff9bd66
2 changed files with 12 additions and 5 deletions

View file

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