mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 12:46:04 +01:00
Fix typos for path-distance-margin
This commit is contained in:
parent
3e5e77aa3a
commit
4a73b0faf6
@ -1145,7 +1145,7 @@ public class NPCCommands {
|
|||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
aliases = { "npc" },
|
aliases = { "npc" },
|
||||||
usage = "pathopt --avoid-water|aw [true|false] --stationary-ticks [ticks] --attack-range [range] --distance-margin [margin]",
|
usage = "pathopt --avoid-water|aw [true|false] --stationary-ticks [ticks] --attack-range [range] --distance-margin [margin] --path-distance-margin [margin]",
|
||||||
desc = "Sets an NPC's pathfinding options",
|
desc = "Sets an NPC's pathfinding options",
|
||||||
modifiers = { "pathopt", "po", "patho" },
|
modifiers = { "pathopt", "po", "patho" },
|
||||||
min = 1,
|
min = 1,
|
||||||
@ -1178,7 +1178,7 @@ public class NPCCommands {
|
|||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
if (args.hasValueFlag("path-distance-margin")) {
|
if (args.hasValueFlag("path-distance-margin")) {
|
||||||
double distance = Double.parseDouble(args.getFlag("distance-margin"));
|
double distance = Double.parseDouble(args.getFlag("path-distance-margin"));
|
||||||
if (distance < 0)
|
if (distance < 0)
|
||||||
throw new CommandException();
|
throw new CommandException();
|
||||||
npc.getNavigator().getDefaultParameters().pathDistanceMargin(Math.pow(distance, 2));
|
npc.getNavigator().getDefaultParameters().pathDistanceMargin(Math.pow(distance, 2));
|
||||||
|
Loading…
Reference in New Issue
Block a user