From 71ce9cd901d61bef12bea6bc7289f47b05e99c28 Mon Sep 17 00:00:00 2001 From: Brady Date: Thu, 23 Aug 2018 21:01:35 -0500 Subject: [PATCH] Make the prefix optional --- src/main/java/baritone/Settings.java | 5 +++++ src/main/java/baritone/utils/ExampleBaritoneControl.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/Settings.java b/src/main/java/baritone/Settings.java index 57e0543b..3b64e70a 100644 --- a/src/main/java/baritone/Settings.java +++ b/src/main/java/baritone/Settings.java @@ -241,6 +241,11 @@ public class Settings { */ public Setting pathThroughCachedOnly = new Setting<>(false); + /** + * Whether or not to use the "#" command prefix + */ + public Setting prefix = new Setting<>(false); + public final Map> byLowerName; public final List> allSettings; diff --git a/src/main/java/baritone/utils/ExampleBaritoneControl.java b/src/main/java/baritone/utils/ExampleBaritoneControl.java index 063c939c..52b142af 100644 --- a/src/main/java/baritone/utils/ExampleBaritoneControl.java +++ b/src/main/java/baritone/utils/ExampleBaritoneControl.java @@ -55,7 +55,7 @@ public class ExampleBaritoneControl extends Behavior { return; } String msg = event.getMessage(); - if (!msg.startsWith("#")) + if (Baritone.settings().prefix.get() && !msg.startsWith("#")) return; msg = msg.substring(1);