Development Assistance How to detect nodes that users input?

Discussion in 'Plugin Help/Development/Requests' started by GDRCode, Aug 12, 2015.

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

    GDRCode

    How would i load and save config nodes that a user enters like in a rankup plugin (i am making a rankup plugin and i need this badly) example something like

    ranks:
    A:500
    B:1000
    C:2500
     
  2. Offline

    BizarrePlatinum

    @GDRCode If you mean arguments, it's basic to commands. Simply test what has been input at args[0] and do something based on that. You could use a switch for it or an if statement.
     
  3. Offline

    GDRCode

    no, say someone entered D:20000 how would i detect that like how would i get all the stuff under ranls
     
  4. Offline

    I Al Istannen

    @GDRCode You can get all Values using this method. This will return a Map<String, Object>. String is the path and object the value that is there. Using your exapmple the String would be "A" and the Object an Integer equalling to "500". This will return ALL values under the given path, hence the map.
     
Thread Status:
Not open for further replies.

Share This Page