codacy
This commit is contained in:
parent
3cf944398f
commit
efb316de14
@ -88,14 +88,12 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
|
|||||||
@Override
|
@Override
|
||||||
public void onSendChatMessage(ChatEvent event) {
|
public void onSendChatMessage(ChatEvent event) {
|
||||||
String msg = event.getMessage();
|
String msg = event.getMessage();
|
||||||
if (Baritone.settings().prefixControl.get()) {
|
if (Baritone.settings().prefixControl.get() && msg.startsWith(COMMAND_PREFIX)) {
|
||||||
if (msg.startsWith(COMMAND_PREFIX)) {
|
if (!runCommand(msg.substring(COMMAND_PREFIX.length()))) {
|
||||||
if (!runCommand(msg.substring(COMMAND_PREFIX.length()))) {
|
logDirect("Invalid command");
|
||||||
logDirect("Invalid command");
|
|
||||||
}
|
|
||||||
event.cancel(); // always cancel if using prefixControl
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
event.cancel(); // always cancel if using prefixControl
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (!Baritone.settings().chatControl.get() && !Baritone.settings().removePrefix.get()) {
|
if (!Baritone.settings().chatControl.get() && !Baritone.settings().removePrefix.get()) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user