dokato Posted March 23, 2015 Share Posted March 23, 2015 If i'd like to capture when i recieve for example willog logs, is this the correct code to use? public void onMessage(String message) throws InterruptedException{ if(message.contains("logs")){ amountOfLogs++; } } i saw it this way in some other guides but it doesnt work Quote Link to comment Share on other sites More sharing options...
Rudie Posted March 23, 2015 Share Posted March 23, 2015 I use this: public void onMessage(Message message) throws java.lang.InterruptedException { String txt = message.getMessage().toLowerCase(); if (txt.contains("the fire catches")) { firesMade++; } } Good luck! 3 Quote Link to comment Share on other sites More sharing options...
dokato Posted March 23, 2015 Author Share Posted March 23, 2015 I use this: public void onMessage(Message message) throws java.lang.InterruptedException { String txt = message.getMessage().toLowerCase(); if (txt.contains("the fire catches")) { firesMade++; } } Good luck! works fine for me THX alot bro Quote Link to comment Share on other sites More sharing options...
Rudie Posted March 23, 2015 Share Posted March 23, 2015 works fine for me THX alot bro No problem! Quote Link to comment Share on other sites More sharing options...
atheoran Posted March 24, 2015 Share Posted March 24, 2015 No problem! +1 Quote Link to comment Share on other sites More sharing options...
Extreme Scripts Posted March 24, 2015 Share Posted March 24, 2015 If i'd like to capture when i recieve for example willog logs, is this the correct code to use? public void onMessage(String message) throws InterruptedException{ if(message.contains("logs")){ amountOfLogs++; } } i saw it this way in some other guides but it doesnt work This was the old API method in case you were wondering why it didn't work. Message is the new param. 1 Quote Link to comment Share on other sites More sharing options...