fixed prefix logic

This commit is contained in:
leijurv 2018-08-23 20:12:36 -07:00
parent 6631f9c80f
commit 37d4e7b178

View File

@ -55,10 +55,12 @@ public class ExampleBaritoneControl extends Behavior {
return;
}
String msg = event.getMessage();
if (Baritone.settings().prefix.get() && !msg.startsWith("#"))
if (Baritone.settings().prefix.get()) {
if (!msg.startsWith("#")) {
return;
}
msg = msg.substring(1);
}
if (msg.toLowerCase().startsWith("goal")) {
event.cancel();
String[] params = msg.toLowerCase().substring(4).trim().split(" ");