mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-25 02:27:41 +01:00
Add /npc pathto
This commit is contained in:
parent
8c1b51da98
commit
ace484636a
@ -1389,6 +1389,22 @@ public class NPCCommands {
|
|||||||
Messaging.sendTr(sender, Messages.PATHFINDING_RANGE_SET, range);
|
Messaging.sendTr(sender, Messages.PATHFINDING_RANGE_SET, range);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Command(
|
||||||
|
aliases = { "npc" },
|
||||||
|
usage = "pathto [x] [y] [z]",
|
||||||
|
desc = "Starts pathfinding to a certain location",
|
||||||
|
modifiers = { "pathto" },
|
||||||
|
min = 4,
|
||||||
|
max = 4,
|
||||||
|
permission = "citizens.npc.pathto")
|
||||||
|
public void pathto(CommandContext args, CommandSender sender, NPC npc) {
|
||||||
|
Location loc = npc.getStoredLocation();
|
||||||
|
loc.setX(args.getDouble(1));
|
||||||
|
loc.setY(args.getDouble(2));
|
||||||
|
loc.setZ(args.getDouble(3));
|
||||||
|
npc.getNavigator().setTarget(loc);
|
||||||
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
aliases = { "npc" },
|
aliases = { "npc" },
|
||||||
usage = "playerlist (-a,r)",
|
usage = "playerlist (-a,r)",
|
||||||
|
Loading…
Reference in New Issue
Block a user