This commit is contained in:
Leijurv 2019-02-05 18:11:33 -08:00
parent 3cf944398f
commit efb316de14
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 5 additions and 7 deletions

View File

@ -88,14 +88,12 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
@Override
public void onSendChatMessage(ChatEvent event) {
String msg = event.getMessage();
if (Baritone.settings().prefixControl.get()) {
if (msg.startsWith(COMMAND_PREFIX)) {
if (!runCommand(msg.substring(COMMAND_PREFIX.length()))) {
logDirect("Invalid command");
}
event.cancel(); // always cancel if using prefixControl
return;
if (Baritone.settings().prefixControl.get() && msg.startsWith(COMMAND_PREFIX)) {
if (!runCommand(msg.substring(COMMAND_PREFIX.length()))) {
logDirect("Invalid command");
}
event.cancel(); // always cancel if using prefixControl
return;
}
if (!Baritone.settings().chatControl.get() && !Baritone.settings().removePrefix.get()) {
return;