getKeys for a key with "." Characters...

Discussion in 'Plugin Development' started by TheE, Jun 30, 2012.

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

    TheE

    What I have as config is this:
    Code:
    derp:
      '30.06.2012':
        foo: bar
        foo2: bar2
    I need to get the date and both keys. My problem is that getConfigurationSection("derp").getKeys(false) only outputs "30" and not the whole date. Is there some simple way to get the whole line without the need to change the format in the config?

    Thanks.
     
  2. set the path seperator inside the option node to something else whit the options of the YAMLConfiguration
     
  3. Offline

    TheE

    It doesn't seem to work. Now I have:
    Code:
    public void onEnable() {
        createFolder();
        createConfig();
        getConfig().options().pathSeparator('_');
        System.out.println("Key: " + getConfig().getConfigurationSection("derp").getKeys(false));
        }
    And all I get is "Key: [30]".
     
  4. Offline

    pzxc

    Personally I would store the date as a key with something other than periods, like 30-06-2012
     
Thread Status:
Not open for further replies.

Share This Page