July 15, 20178 yr Right now i am using this to detect if player says number if (player != null && m.getUsername().equalsIgnoreCase(player.getName())) { log("player has spoken"); if (m.getMessage().matches(".*\\d+.*")) { hasSpoken = true; } but when i change (".*\\d+.*") to "certain word" it doesn't detect it how to i get this to work
July 15, 20178 yr Use contains if you want to check for the word anywhere in what they said or use equals if you want an exact match m.getMessage().contains("doge"); Edited July 15, 20178 yr by Imateamcape
Create an account or sign in to comment