@Override
public void onMessage(Message m) {
if (m.getMessage().contains("You do not have enough"))
log("We do not have enough.");
stop();
}
Most likely this one. It may be easier to understand if I reformat the code properly to this
@Override
public void onMessage(Message m) {
if (m.getMessage().contains("You do not have enough"))
log("We do not have enough.");
stop();
}
If you don't add braces then only 1 instruction is considered to be the if block, therefore this code should stop on any message including when someone types something in public chat if your chat is not filtered. Leveling up sends 1 message in the chat behind the dialogue.