removePrefix

This commit is contained in:
Leijurv 2018-09-02 12:06:00 -07:00
parent 8d62f754a7
commit e8b108fde8
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 8 additions and 1 deletions

View File

@ -218,6 +218,11 @@ public class Settings {
*/ */
public Setting<Boolean> chatControl = new Setting<>(true); public Setting<Boolean> chatControl = new Setting<>(true);
/**
* A second override over chatControl to force it on
*/
public Setting<Boolean> removePrefix = new Setting<>(false);
/** /**
* Render the path * Render the path
*/ */

View File

@ -57,8 +57,10 @@ public class ExampleBaritoneControl extends Behavior {
@Override @Override
public void onSendChatMessage(ChatEvent event) { public void onSendChatMessage(ChatEvent event) {
if (!Baritone.settings().chatControl.get()) { if (!Baritone.settings().chatControl.get()) {
if (!Baritone.settings().removePrefix.get()) {
return; return;
} }
}
String msg = event.getMessage(); String msg = event.getMessage();
if (Baritone.settings().prefix.get()) { if (Baritone.settings().prefix.get()) {
if (!msg.startsWith("#")) { if (!msg.startsWith("#")) {