mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-29 05:55:19 +01:00
Changed advancedportals.warp to effect the command and not destinations
This commit is contained in:
parent
a8521b3998
commit
5c4cbaa127
@ -51,4 +51,4 @@ permissions:
|
||||
default: op
|
||||
advancedportals.warp.*:
|
||||
description: Access to all warps (not really used tbh)
|
||||
default: true
|
||||
default: op
|
||||
|
@ -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();
|
||||
|
@ -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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user