fixed portal perms

This commit is contained in:
Alastair 2017-03-07 12:12:16 +00:00
parent cb5e429de0
commit 9f32237dae
2 changed files with 3 additions and 6 deletions

View File

@ -15,6 +15,7 @@ commands:
permissions:
advancedportals.*:
description: Gives access to all commands
default: op
children:
advancedportals.createportal: true
advancedportals.portal: true
@ -33,9 +34,6 @@ permissions:
advancedportals.desti:
description: Gives access to all desti commands
default: op
advancedportals.desti.default:
description: Gives access to all destinations (really need to make proper desti warp permission setup)
default: true
advancedportals.warp.*:
description: Access to all warps
default: op
default: true

View File

@ -108,8 +108,7 @@ public class Destination {
}
public static boolean warp(Player player, String name) {
if (!player.hasPermission("advancedportals.warp.*") && !player.hasPermission("advancedportals.desti." + name)
&& !player.hasPermission("advancedportals.warp.default")) {
if (!(player.hasPermission("advancedportals.warp.*") || player.hasPermission("advancedportals.warp." + name))) {
player.sendMessage(PluginMessages.customPrefixFail + " You don't have permission to warp to " + name + "!");
return false;
}