Turn the player hooks into a tristate
This commit is contained in:
parent
1cdd33a78a
commit
79f66f554f
5 changed files with 85 additions and 25 deletions
|
|
@ -1265,8 +1265,10 @@ namespace TShockAPI
|
|||
/// <returns>True if the player has that permission.</returns>
|
||||
public bool HasPermission(string permission)
|
||||
{
|
||||
if (PlayerHooks.OnPlayerPermission(this, permission))
|
||||
return true;
|
||||
PermissionResult hookResult = PlayerHooks.OnPlayerPermission(this, permission);
|
||||
|
||||
if (hookResult != PermissionResult.Inconclusive)
|
||||
return hookResult == PermissionResult.Granted;
|
||||
|
||||
if (tempGroup != null)
|
||||
return tempGroup.HasPermission(permission);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue