mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 20:15:58 +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
|
default: op
|
||||||
advancedportals.warp.*:
|
advancedportals.warp.*:
|
||||||
description: Access to all warps (not really used tbh)
|
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) {
|
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");
|
ConfigAccessor config = new ConfigAccessor(plugin, "destinations.yml");
|
||||||
if (config.getConfig().getString(name + ".world") != null) {
|
if (config.getConfig().getString(name + ".world") != null) {
|
||||||
Location loc = player.getLocation();
|
Location loc = player.getLocation();
|
||||||
|
@ -90,6 +90,10 @@ public class DestinationCommand implements CommandExecutor, TabCompleter {
|
|||||||
sender.sendMessage("\u00A7e\u00A7m----------------------------");
|
sender.sendMessage("\u00A7e\u00A7m----------------------------");
|
||||||
break;
|
break;
|
||||||
case "warp":
|
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){
|
if(args.length >= 2){
|
||||||
Destination.warp((Player) sender, args[1]);
|
Destination.warp((Player) sender, args[1]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user