Turn the player hooks into a tristate

This commit is contained in:
Ruby Rose 2017-07-11 10:37:17 +03:00
parent 1cdd33a78a
commit 79f66f554f
5 changed files with 85 additions and 25 deletions

View file

@ -206,8 +206,9 @@ namespace TShockAPI.DB
if (ply.HasPermission(Permissions.canusebannedtiles))
return true;
if (PlayerHooks.OnPlayerTilebanPermission(ply, this))
return true;
PermissionResult hookResult = PlayerHooks.OnPlayerTilebanPermission(ply, this);
if (hookResult != PermissionResult.Inconclusive)
return hookResult == PermissionResult.Granted;
var cur = ply.Group;
var traversed = new List<Group>();