forked from RepoMirrors/baritone
removePrefix
This commit is contained in:
parent
8d62f754a7
commit
e8b108fde8
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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("#")) {
|
||||||
|
|
Loading…
Reference in New Issue