diff --git a/Resources/plugin.yml b/Resources/plugin.yml index 641bd5aa..98aea5f5 100644 --- a/Resources/plugin.yml +++ b/Resources/plugin.yml @@ -51,4 +51,4 @@ permissions: default: op advancedportals.warp.*: description: Access to all warps (not really used tbh) - default: true + default: op diff --git a/src/com/sekwah/advancedportals/destinations/Destination.java b/src/com/sekwah/advancedportals/destinations/Destination.java index a8a66b4a..34d6fb0b 100644 --- a/src/com/sekwah/advancedportals/destinations/Destination.java +++ b/src/com/sekwah/advancedportals/destinations/Destination.java @@ -101,10 +101,6 @@ public class Destination { } public static boolean warp(Player player, String name) { - 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; - } ConfigAccessor config = new ConfigAccessor(plugin, "destinations.yml"); if (config.getConfig().getString(name + ".world") != null) { Location loc = player.getLocation(); diff --git a/src/com/sekwah/advancedportals/destinations/DestinationCommand.java b/src/com/sekwah/advancedportals/destinations/DestinationCommand.java index bd923884..0d25429e 100644 --- a/src/com/sekwah/advancedportals/destinations/DestinationCommand.java +++ b/src/com/sekwah/advancedportals/destinations/DestinationCommand.java @@ -90,6 +90,10 @@ public class DestinationCommand implements CommandExecutor, TabCompleter { sender.sendMessage("\u00A7e\u00A7m----------------------------"); break; case "warp": + if (!(sender.hasPermission("advancedportals.warp.*") || sender.hasPermission("advancedportals.warp." + args[1]))) { + sender.sendMessage(PluginMessages.customPrefixFail + " You don't have permission to warp to " + args[1] + "!"); + return false; + } if(args.length >= 2){ Destination.warp((Player) sender, args[1]); }