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; } } }
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; } } }