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: permissions:
advancedportals.*: advancedportals.*:
description: Gives access to all commands description: Gives access to all commands
default: op
children: children:
advancedportals.createportal: true advancedportals.createportal: true
advancedportals.portal: true advancedportals.portal: true
@ -33,9 +34,6 @@ permissions:
advancedportals.desti: advancedportals.desti:
description: Gives access to all desti commands description: Gives access to all desti commands
default: op default: op
advancedportals.desti.default:
description: Gives access to all destinations (really need to make proper desti warp permission setup)
default: true
advancedportals.warp.*: advancedportals.warp.*:
description: Access to all warps 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) { public static boolean warp(Player player, String name) {
if (!player.hasPermission("advancedportals.warp.*") && !player.hasPermission("advancedportals.desti." + name) if (!(player.hasPermission("advancedportals.warp.*") || player.hasPermission("advancedportals.warp." + name))) {
&& !player.hasPermission("advancedportals.warp.default")) {
player.sendMessage(PluginMessages.customPrefixFail + " You don't have permission to warp to " + name + "!"); player.sendMessage(PluginMessages.customPrefixFail + " You don't have permission to warp to " + name + "!");
return false; return false;
} }