diff --git a/src/main/java/baritone/utils/ExampleBaritoneControl.java b/src/main/java/baritone/utils/ExampleBaritoneControl.java index 19efa55f..b418f067 100644 --- a/src/main/java/baritone/utils/ExampleBaritoneControl.java +++ b/src/main/java/baritone/utils/ExampleBaritoneControl.java @@ -19,8 +19,8 @@ package baritone.utils; import baritone.Baritone; import baritone.Settings; -import baritone.api.event.events.ChatEvent; import baritone.api.behavior.Behavior; +import baritone.api.event.events.ChatEvent; import baritone.behavior.FollowBehavior; import baritone.behavior.MineBehavior; import baritone.behavior.PathingBehavior; @@ -41,7 +41,7 @@ import net.minecraft.util.math.BlockPos; import java.util.*; -public class ExampleBaritoneControl extends Behavior implements Helper { +public class ExampleBaritoneControl extends Behavior implements Helper { public static ExampleBaritoneControl INSTANCE = new ExampleBaritoneControl(); @@ -238,6 +238,13 @@ public class ExampleBaritoneControl extends Behavior implements Helper { event.cancel(); return; } + if (msg.toLowerCase().equals("save")) { + String name = msg.substring(4).trim(); + WorldProvider.INSTANCE.getCurrentWorld().waypoints.addWaypoint(new Waypoint(name, Waypoint.Tag.HOME, playerFeet())); + logDirect("Saved user defined tag under name '" + name + "'. Say 'goto user' to set goal, say 'list user' to list."); + event.cancel(); + return; + } if (msg.toLowerCase().startsWith("goto")) { String waypointType = msg.toLowerCase().substring(4).trim(); if (waypointType.endsWith("s") && Waypoint.Tag.fromString(waypointType.substring(0, waypointType.length() - 1)) != null) {