src/main/java/com/cjburkey/claimchunk/Utils.java
public static boolean hasPerm(@Nullable CommandSender sender, boolean basic, String perm) {
        if (sender == null) return false;

        // Ops can do everything
        if (sender.isOp()) return true;

        // If permissions are disabled, the user will have this command if it's a "basic" command
        if (claimChunk.chConfig().getDisablePermissions()) {
            return basic;
        }

        // If `claimchunk.player` is used, then the player will be able to use this command if it's a "basic" command
        if (basic && sender.hasPermission("claimchunk.player")) {
            return true;
        }

        // Check permission
        return sender.hasPermission("claimchunk." + perm);
    }
/**
     * Check if a command sender has a given permission.
     * Note: If the sender has {@code claimchunk.admin}, they will have all permissions.
     *
     * @param sender The given command sender (player, console, etc).
     * @param basic Whether or not {@code claimchunk.player} should also grant this permission.
     * @param perm The string for the permission node.
     * @return A boolean representing whether the sender has this permission.
     */
Check if a command sender has a given permission.
Note: If the sender has  claimchunk.admin, they will have all permissions.

@param sender The given command sender (player, console, etc).
@param basic Whether or not  claimchunk.player should also grant this permission.
@param perm The string for the permission node.
@return A boolean representing whether the sender has this permission.
Check if a command sender has a given permission . Note : If the sender has claimchunk . admin they will have all permissions . @param sender The given command sender ( player console etc ) . @param basic Whether or not claimchunk . player should also grant this permission . @param perm The string for the permission node . @return A boolean representing whether the sender has this permission .
public static boolean hasPerm(@Nullable CommandSender sender, boolean basic, String perm) {
        if (sender == null) return false;
        if (sender.isOp()) return true;
        if (claimChunk.chConfig().getDisablePermissions()) {
            return basic;
        }
        if (basic && sender.hasPermission("claimchunk.player")) {
            return true;
        }
        return sender.hasPermission("claimchunk." + perm);
    }
public static boolean hasPerm ( @ Nullable CommandSender sender , boolean basic , String perm ) { if ( sender == null ) return false ; if ( sender . isOp ( ) ) return true ; if ( claimChunk . chConfig ( ) . getDisablePermissions ( ) ) { return basic ; } if ( basic && sender . hasPermission ( "claimchunk.player" ) ) { return true ; } return sender . hasPermission ( "claimchunk." + perm ) ; }
Check if a command sender has a given permission.
Check if a command sender has a given permission .
// Ops can do everything // If permissions are disabled, the user will have this command if it's a "basic" command // If `claimchunk.player` is used, then the player will be able to use this command if it's a "basic" command // Check permission