Package ru.tehkode.permissions

Examples of ru.tehkode.permissions.PermissionCheckResult.toBoolean()


    PermissionCheckResult res = permissionValue(permission);

    switch (res) {
      case TRUE:
      case FALSE:
        return res.toBoolean();
      case UNDEFINED:
      default:
        if (super.isPermissionSet(permission)) {
          final boolean ret = super.hasPermission(permission);
          if (isDebug()) {
View Full Code Here


    PermissionCheckResult res = permissionValue(permission.getName());

    switch (res) {
      case TRUE:
      case FALSE:
        return res.toBoolean();
      case UNDEFINED:
      default:
        if (super.isPermissionSet(permission.getName())) {
          final boolean ret = super.hasPermission(permission);
          if (isDebug()) {
View Full Code Here

        }
      }
      if (res == PermissionCheckResult.UNDEFINED) {
        for (Map.Entry<String, Boolean> ent : plugin.getRegexPerms().getPermissionList().getParents(permission)) {
          if ((res = permissionValue(ent.getKey())) != PermissionCheckResult.UNDEFINED) {
            res = PermissionCheckResult.fromBoolean(!(res.toBoolean() ^ ent.getValue()));
            if (isDebug()) {
              plugin.getLogger().info("User " + player.getName() + " checked for permission '" + permission + "', match from parent '" + ent.getKey() + "' (CACHE MISS)");
            }
            break;
          }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.