Esempio n. 1
0
 public static boolean hasPermission(Player p, String permission) {
   if (iSafeConfig.getISafeConfig().getBoolean("UseVaultForPermissions", true)) {
     if (iSafe.perms.has(p, permission)) {
       return true;
     } else {
       if (shallOutputNoPerm() == false) {
         // ignore.
       } else {
         Messages.sendNoPermissionNotify(p);
       }
       return false;
     }
   } else {
     if (p.hasPermission(permission)) {
       return true;
     } else {
       if (shallOutputNoPerm() == false) {
         // ignore.
       } else {
         Messages.sendNoPermissionNotify(p);
       }
       return false;
     }
   }
 }
Esempio n. 2
0
 public static boolean hasPermission(CommandSender sender, String permission) {
   if (iSafeConfig.getISafeConfig().getBoolean("UseVaultForPermissions", true)) {
     if (iSafe.perms.has(sender, permission)) {
       return true;
     } else {
       Messages.sendNoPermissionNotify(sender);
       return false;
     }
   } else {
     if (sender.hasPermission(permission)) {
       return true;
     } else {
       Messages.sendNoPermissionNotify(sender);
       return false;
     }
   }
 }