Development Assistance CommandBlock help

Discussion in 'Plugin Help/Development/Requests' started by quinster08, Aug 24, 2015.

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

    quinster08

    Hello,

    There is a method block.getCommand() for the command block. That will return the string in commandblock. But how can I check for the arguments in the commandblock??
     
  2. Online

    timtower Administrator Administrator Moderator

    quinster08 likes this.
  3. Offline

    quinster08

    @timtower now how would I get project as the command and a int as the first argument?
     
  4. Online

    timtower Administrator Administrator Moderator

  5. Offline

    quinster08

    @timtower fixed thanks! int x = Integer.valueOf(args[1]);
     
  6. Online

    timtower Administrator Administrator Moderator

    @quinster08 Be careful with it though, it will throw an exception when you put something in that isn't an integer.
     
  7. Offline

    quinster08

Thread Status:
Not open for further replies.

Share This Page