Getting a set of values

Discussion in 'Plugin Development' started by np98765, Sep 28, 2012.

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

    np98765

    Hey there,

    If my config is set up like this:

    Code:
    worlds:
      nether:
        # Stuff here
      end:
        # Stuff here
    
    And when the player runs /world <worldName>, I want it to run through any worlds defined in the config.

    How would I get that set of worlds to check to see if the command contains it?

    Thanks!
     
  2. Offline

    MrFigg

    Set<String> worlds = config.getConfigurationSection("worlds").getKeys(false);
     
  3. Offline

    np98765

    Ah, getConfigurationSection is what I was looking for. Thanks! :)
     
  4. Offline

    LukeSFT

    Then please add "[SOLVED]" to the title of your thread.
     
Thread Status:
Not open for further replies.

Share This Page