Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/16/24 in all areas

  1. @Override public void onMessage(Message msg) throws InterruptedException { if (msg.getType() == Message.MessageType.GAME && msg.getMessage().contains("Declined trade or what ever it says")) { //do stuff } }
    2 points
  2. Don't forget to add a null check, somehow it can at times return a null and be annoying, but that is my paranoia maybe ^^ version1: @Override public void onMessage(Message msg) { if (msg != null && msg.getType() == Message.MessageType.GAME && msg.getMessage().contains("Declined trade or what ever it says")) { // do stuff } } or return on null, depending on what u like: @Override public void onMessage(Message msg) { if (msg == null) { return; } if (msg.getType() == Message.MessageType.GAME && msg.getMessage().contains("Declined trade or what ever it says")) { // do stuff } }
    1 point
×
×
  • Create New...