don't crash on thisway typo lol
This commit is contained in:
parent
e3830643f6
commit
7d0914bd43
@ -209,9 +209,13 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (msg.toLowerCase().startsWith("thisway")) {
|
if (msg.toLowerCase().startsWith("thisway")) {
|
||||||
Goal goal = GoalXZ.fromDirection(playerFeetAsVec(), player().rotationYaw, Double.parseDouble(msg.substring(7).trim()));
|
try {
|
||||||
PathingBehavior.INSTANCE.setGoal(goal);
|
Goal goal = GoalXZ.fromDirection(playerFeetAsVec(), player().rotationYaw, Double.parseDouble(msg.substring(7).trim()));
|
||||||
logDirect("Goal: " + goal);
|
PathingBehavior.INSTANCE.setGoal(goal);
|
||||||
|
logDirect("Goal: " + goal);
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
logDirect("Error unable to parse '" + msg.substring(7).trim() + "' to a double.");
|
||||||
|
}
|
||||||
event.cancel();
|
event.cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user