Get a property from yml file outputs null - ie: 0.Enabled

Discussion in 'Plugin Development' started by Randy Schouten, Jun 18, 2011.

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

    Randy Schouten

    I try to get a property called "0.Enabled", but it always outputs null. (It's a zero, not a letter.)

    Config is like this ofcourse:
    Code:
    0:
        Enabled: true
    
    I think the problem lies in the fact that the first "branch" or however you want to call it is a int.

    Anyone knows how I can get this to work?
     
  2. Offline

    garbagemule

    I had the same problem with numbers. Put an apostrophe on both sides of the number and you're golden
    Code:
    '0':
        Enabled: true
     
  3. Offline

    Randy Schouten

    That's not possible, that's why I'm wondering if anyone here knows this :p
     
  4. Offline

    garbagemule

    Why is that not possible? You access the node like you would any other node.
     
  5. Offline

    Randy Schouten

    It's not possible since it's a config from another plugin.
     
  6. Offline

    garbagemule

    OH, haha! Maybe ask the plugin developer how he does it? If you figure it out, make sure to post it here for the rest of us to see :3
     
Thread Status:
Not open for further replies.

Share This Page