Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Check a deep permission, this will check to see if the permissions is defined for this use
- * If using Permissions it will return the same as hasPerm
- * If using SuperPerms will return true if the node isn't defined
- * Or the value of the node if it is
- */
- public static boolean hasPermDeep(Player player, String perm) {
- if (permissions != null) {
- if (permDebug)
- Stargate.debug("hasPermDeep::Permissions", perm + " => " + permissions.getHandler().has(player, perm));
- return permissions.getHandler().has(player, perm);
- } else {
- if (!player.isPermissionSet(perm)) {
- if (permDebug)
- Stargate.debug("hasPermDeep::SuperPerm", perm + " => true");
- return true;
- }
- if (permDebug)
- Stargate.debug("hasPermDeep::SuperPerms", perm + " => " + player.hasPermission(perm));
- return player.hasPermission(perm);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement