From 1b04386b01dee65d672d4d1c8861d875903c02d6 Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Sun, 17 Oct 2021 13:53:55 +0200 Subject: [PATCH] Allow saving unnamed waypoints by position --- src/main/java/baritone/command/defaults/WaypointsCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/command/defaults/WaypointsCommand.java b/src/main/java/baritone/command/defaults/WaypointsCommand.java index 5d964da4..c0757518 100644 --- a/src/main/java/baritone/command/defaults/WaypointsCommand.java +++ b/src/main/java/baritone/command/defaults/WaypointsCommand.java @@ -129,7 +129,7 @@ public class WaypointsCommand extends Command { if (tag == null) { throw new CommandInvalidStateException(String.format("'%s' is not a tag ", args.consumedString())); } - String name = args.hasAny() ? args.getString() : ""; + String name = (args.hasExactlyOne() || args.hasExactly(4)) ? args.getString() : ""; BetterBlockPos pos = args.hasAny() ? args.getDatatypePost(RelativeBlockPos.INSTANCE, ctx.playerFeet()) : ctx.playerFeet(); @@ -292,6 +292,7 @@ public class WaypointsCommand extends Command { "Usage:", "> wp [l/list] - List all waypoints.", "> wp - Save your current position as an unnamed waypoint with the specified tag.", + "> wp - Save an unnamed waypoint with the specified tag and position.", "> wp - Save the waypoint with the specified name.", "> wp - Save the waypoint with the specified name and position.", "> wp - Show info on a waypoint by tag.",