dokato Posted March 23, 2015 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
Rudie Posted March 23, 2015 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
dokato Posted March 23, 2015 Author 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
Extreme Scripts Posted March 24, 2015 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