#872 Use Player#hasPermission instead of custom PermissionHandler method
- Use Player#hasPermission to check if a player has a permission - Remove hasPermission method from PermissionHandler implementations
This commit is contained in:
@@ -198,13 +198,13 @@ public class PermissionsManager implements Reloadable {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Return if the player is an Op if sender is console or no permission system in use
|
||||
// Return default if sender is not a player or no permission system is in use
|
||||
if (!(sender instanceof Player) || !isEnabled()) {
|
||||
return permissionNode.getDefaultPermission().evaluate(sender);
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
return handler.hasPermission(player, permissionNode);
|
||||
return player.hasPermission(permissionNode.getNode());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user