better error message

This commit is contained in:
Leijurv 2018-09-04 15:53:11 -07:00
parent 2bb01fdd20
commit 0c4fd39845
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -105,8 +105,12 @@ public class ExampleBaritoneControl extends Behavior {
} }
if (msg.equals("path")) { if (msg.equals("path")) {
if (!PathingBehavior.INSTANCE.path()) { if (!PathingBehavior.INSTANCE.path()) {
if (PathingBehavior.INSTANCE.getGoal() == null) {
displayChatMessageRaw("No goal.");
} else {
displayChatMessageRaw("Currently executing a path. Please cancel it first."); displayChatMessageRaw("Currently executing a path. Please cancel it first.");
} }
}
event.cancel(); event.cancel();
return; return;
} }