From 37d4e7b178856e15ea99b8a89fbe4ac9500fbaf3 Mon Sep 17 00:00:00 2001 From: leijurv Date: Thu, 23 Aug 2018 20:12:36 -0700 Subject: [PATCH] fixed prefix logic --- .../java/baritone/utils/ExampleBaritoneControl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/baritone/utils/ExampleBaritoneControl.java b/src/main/java/baritone/utils/ExampleBaritoneControl.java index 52b142af..c79ccab9 100644 --- a/src/main/java/baritone/utils/ExampleBaritoneControl.java +++ b/src/main/java/baritone/utils/ExampleBaritoneControl.java @@ -55,10 +55,12 @@ public class ExampleBaritoneControl extends Behavior { return; } String msg = event.getMessage(); - if (Baritone.settings().prefix.get() && !msg.startsWith("#")) - return; - - msg = msg.substring(1); + 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(" ");