Solved Deleting part of a configuration?

Discussion in 'Plugin Development' started by ZephireNZ, Sep 21, 2013.

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

    ZephireNZ

    I have a YAML file like so:
    Code:yaml
    1.  
    2. name: guildname
    3. tag: TAGG
    4. leader: CoolPlayer
    5. members:
    6. thatplayer: rank
    7. thisplayer: otherrank
    8. CoolPlayer: SuperAwesomeLeader
    9. ranks:
    10. arank:
    11. default: true
    12. colour: DARK_RED
    13. nondefaultperm: true
    14. SuperAwesomeLeader:
    15. colour: DARK_RED
    16. leader: true
    17.  


    If I have a FileConfiguration object, how can I completely delete, for example, the "arank" section, so that it, as well as its children, are deleted?
     
  2. Offline

    Deleted user

    ZephireNZ
    I think it's CONIFGFILE.remove("ranks.aranks");

    Pls like if this helpedd
     
  3. Offline

    ZephireNZ

    Hm, if there is I'm not seeing it.

    Going back to Google using different search terms, I found this:

    Code:java
    1. plugin.getConfig().getConfigurationSection("Warps").set(args[0], null)


    Looks like that's what I want. Thanks for the help anyway!
     
Thread Status:
Not open for further replies.

Share This Page