How would I get the first argument of a command. I know this much so far Code: @EventHandler public void onCommandSend(PlayerCommandPreprocessEvent event){ String message = event.getMessage(); } Lets say the command was /help 3 How would I get the help part from the message and that only. I want it to cut off the 3 part if thats possible. Thanks Can anyone please help. This is really urgent. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Code:java String[] command = event.getMessage().split(" "); zakarls You could try something like this If I'm correct then you should be able to do this: For example: /help 3 command[1] should equal 3
ChazSchmidt It doesnt matter if it returns with the / because im just checking if it contains "help" so it would be fine. But... it would work, right?