onCommand arguments

Discussion in 'Plugin Development' started by knoxcorner, Oct 7, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    knoxcorner

    Hello, got a quick question:
    How do I get arguments after a command with onCommand? I can get the hello if someone types "/hello 5" but not the 5. Any help is appreciated, thanks in advance.
     
  2. Offline

    FenixAzul

    if u look closer the args its an array String[] args
    so example
    args[0] wil be the 5

    example

    /command blah blah2
    to get blah 2 u do args[1]
    to get blah u do args[0]
     
    knoxcorner likes this.
  3. Offline

    knoxcorner

    Thanks, I thought it was for something else.
     
Thread Status:
Not open for further replies.

Share This Page