Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved onMessageReceived does not fire.

The only thing Alpha about me is my bots
Joined
Sep 22, 2014
Messages
618
Code:
    public void onMessageReceived(MessageEvent arg0) {
        System.out.print(arg0.getMessage());
    }


Before you ask, yes, I am using getEventDispatcher().addListener(this);

Frequently doesn't print anything out to the console. I'd post a screenshot, but it would just consist of a chatbox with a load of messages in it and nothing in the console.

@Qosmiof2 can also corroborate this.
 
I've been called a god before.
Joined
Aug 5, 2014
Messages
3,212
I agree. There is a problem with messageListener.

Here is what i use. But it only prints on specific texts. Example: When you level up, it will print it. But when its a normal chat message, it wont detect it.

Code:
@Override
    public void onMessageReceived(MessageEvent message) {
        String msg = message.getMessage();
        System.out.println(msg);
        if (message.getSender().equals("") && msg.contains("You successfully")) {
            cooked++;
        }
    }
 
Top