samy109 41 Share Posted March 10, 2015 Looked all through api, couldn't figure it out. How do I implement and use it? Much appreciated if someone could tell me, thanks. Link to comment Share on other sites More sharing options...
Vlad 216 Share Posted March 10, 2015 1. Put the method in your main script class and override it. @Override public void onMessage(Message m) { } 2. Get a message and do stuff with it. private int cut; @Override public void onMessage(Message m) { if (m.getMessage().contains("You cut some logs.")) { cut++; } } samy109 1 Link to comment Share on other sites More sharing options...
samy109 41 Author Share Posted March 10, 2015 1. Put the method in your main script class and override it. @Override public void onMessage(Message m) { } 2. Get a message and do stuff with it. private int cut; @Override public void onMessage(Message m) { if (m.getMessage().contains("You cut some logs.")) { cut++; } } Thanks, explains everything. Link to comment Share on other sites More sharing options...
Recommended Posts