clarify error messages

This commit is contained in:
Leijurv 2018-09-09 13:09:56 -07:00
parent 4221c07d1f
commit d29a37664c
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -108,7 +108,11 @@ public class ExampleBaritoneControl extends Behavior {
if (PathingBehavior.INSTANCE.getGoal() == null) {
displayChatMessageRaw("No goal.");
} else {
displayChatMessageRaw("Currently executing a path. Please cancel it first.");
if (PathingBehavior.INSTANCE.getGoal().isInGoal(playerFeet())) {
displayChatMessageRaw("Already in goal");
} else {
displayChatMessageRaw("Currently executing a path. Please cancel it first.");
}
}
}
event.cancel();
@ -266,7 +270,9 @@ public class ExampleBaritoneControl extends Behavior {
Goal goal = new GoalBlock(waypoint.location);
PathingBehavior.INSTANCE.setGoal(goal);
if (!PathingBehavior.INSTANCE.path()) {
displayChatMessageRaw("Currently executing a path. Please cancel it first.");
if (!goal.isInGoal(playerFeet())) {
displayChatMessageRaw("Currently executing a path. Please cancel it first.");
}
}
event.cancel();
return;