mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-06-29 08:04:53 +02: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
|
WarpRiddenEntity: true
|
||||||
|
|
||||||
# Use plugin name in the warp prefix
|
# Use plugin name in the warp messages
|
||||||
|
|
||||||
useWarpPrefix: true
|
useWarpPrefix: true
|
||||||
|
|
||||||
|
# If this is true a custom prefix can be used
|
||||||
|
|
||||||
|
useCustomPrefix: false
|
||||||
|
|
||||||
|
customPrefix: '[Test]'
|
||||||
|
|
||||||
|
|
|
@ -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!");
|
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{
|
else{
|
||||||
sender.sendMessage("§c[§7AdvancedPortals§c] You need to type something after /" + command + "\n"
|
sender.sendMessage("§c[§7AdvancedPortals§c] No portal by that name exists!");
|
||||||
+ "if you do not know what you can put or would like some help with the commands please type /" + command + " help");
|
}
|
||||||
|
}
|
||||||
|
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 + ", if you do not know what you can put or would like some help with the commands please type /" + command + " help");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user