allow goto blocks that end in s

This commit is contained in:
Leijurv 2018-09-01 11:31:42 -07:00
parent 0b892e05cb
commit e354227635
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -217,7 +217,7 @@ public class ExampleBaritoneControl extends Behavior {
}
if (msg.toLowerCase().startsWith("goto")) {
String waypointType = msg.toLowerCase().substring(4).trim();
if (waypointType.endsWith("s")) {
if (waypointType.endsWith("s") && Waypoint.Tag.fromString(waypointType.substring(0, waypointType.length() - 1)) != null) {
// for example, "show deaths"
waypointType = waypointType.substring(0, waypointType.length() - 1);
}