Exemplo 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;
     }
   }
 }
Exemplo n.º 2
0
 public static void sendEcoNotify(Player p, String blacklist, int amount) {
   p.sendMessage(
       Messages.colorize(
           Messages.getMessages()
               .getString("Blacklists." + blacklist + ".EcoMessage")
               .replace("%amount%", String.valueOf(amount))));
 }
Exemplo n.º 3
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;
     }
   }
 }