Merge pull request #879 from Orinion/fix-waypoint-bug

Check if waypoint name is Tag
This commit is contained in:
Leijurv
2019-08-30 13:39:55 -07:00
committed by GitHub

View File

@@ -576,6 +576,12 @@ public class ExampleBaritoneControl implements Helper, AbstractGameEventListener
}
name = parts[0];
}
for (IWaypoint.Tag tag : IWaypoint.Tag.values()) {
if (tag.name().equalsIgnoreCase(name)) {
logDirect("Unable to use tags as name. Tags are: " + Arrays.asList(IWaypoint.Tag.values()).toString().toLowerCase());
return true;
}
}
baritone.getWorldProvider().getCurrentWorld().getWaypoints().addWaypoint(new Waypoint(name, IWaypoint.Tag.USER, pos));
logDirect("Saved user defined position " + pos + " under name '" + name + "'. Say 'goto " + name + "' to set goal, say 'list user' to list custom waypoints.");
return true;