Make the prefix optional
This commit is contained in:
parent
93de55318f
commit
71ce9cd901
@ -241,6 +241,11 @@ public class Settings {
|
|||||||
*/
|
*/
|
||||||
public Setting<Boolean> pathThroughCachedOnly = new Setting<>(false);
|
public Setting<Boolean> pathThroughCachedOnly = new Setting<>(false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not to use the "#" command prefix
|
||||||
|
*/
|
||||||
|
public Setting<Boolean> prefix = new Setting<>(false);
|
||||||
|
|
||||||
public final Map<String, Setting<?>> byLowerName;
|
public final Map<String, Setting<?>> byLowerName;
|
||||||
public final List<Setting<?>> allSettings;
|
public final List<Setting<?>> allSettings;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public class ExampleBaritoneControl extends Behavior {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String msg = event.getMessage();
|
String msg = event.getMessage();
|
||||||
if (!msg.startsWith("#"))
|
if (Baritone.settings().prefix.get() && !msg.startsWith("#"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
msg = msg.substring(1);
|
msg = msg.substring(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user