mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-12-25 18:37:43 +01:00
added a goto command in destination, need to add warp too. also the warp
list
This commit is contained in:
parent
c987143838
commit
7c00efb011
@ -40,6 +40,13 @@ ShowSelectionShowDuration: 10
|
||||
|
||||
WarpRiddenEntity: true
|
||||
|
||||
# Use plugin name in the warp prefix
|
||||
# Use plugin name in the warp messages
|
||||
|
||||
useWarpPrefix: true
|
||||
|
||||
# If this is true a custom prefix can be used
|
||||
|
||||
useCustomPrefix: false
|
||||
|
||||
customPrefix: '[Test]'
|
||||
|
||||
useWarpPrefix: true
|
@ -67,10 +67,24 @@ public class DestinationCommand implements CommandExecutor, TabCompleter {
|
||||
sender.sendMessage("§c[§7AdvancedPortals§c] You need to state the name of the destination you wish to remove!");
|
||||
}
|
||||
}
|
||||
else if(args[0].toLowerCase().equals("goto")) {
|
||||
ConfigAccessor portalConfig = new ConfigAccessor(plugin, "Destinations.yml");
|
||||
if(args.length > 1){
|
||||
String posX = portalConfig.getConfig().getString(args[1] + ".pos1.X");
|
||||
if(posX != null){
|
||||
Destination.warp(sender, args[1]);
|
||||
}
|
||||
else{
|
||||
sender.sendMessage("§c[§7AdvancedPortals§c] No portal by that name exists!");
|
||||
}
|
||||
}
|
||||
else{
|
||||
sender.sendMessage("§c[§7AdvancedPortals§c] You need to state the name of the destination you wish to teleport to!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
sender.sendMessage("§c[§7AdvancedPortals§c] You need to type something after /" + command + "\n"
|
||||
+ "if you do not know what you can put or would like some help with the commands please type /" + command + " help");
|
||||
sender.sendMessage("§c[§7AdvancedPortals§c] You need to type something after /" + command + ", if you do not know what you can put or would like some help with the commands please type /" + command + " help");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user