Parse all args after args[2] in a command to a string

Discussion in 'Plugin Development' started by ice374, Jul 26, 2013.

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

    ice374

    How would i get all characters after args[2] and make it into a string?

    If you understand this better: String baz = args[2] --> end_of_command;
     
  2. Offline

    Tarestudio

    ice374
    Code:java
    1. StringBuilder str = new StringBuilder();
    2. for (int k = 2; k < args.length; k++) {
    3. str.append(args[k]);
    4. }
    5. String baz = str.toString();


    (can someone tell me what I have to write taht it shows \[i\] without the \'s ?)
     
    ice374 likes this.
Thread Status:
Not open for further replies.

Share This Page