Config Issues

Discussion in 'Plugin Development' started by Kiwanga, Dec 6, 2015.

Thread Status:
Not open for further replies.
  1. I'm programming a Clan-Plugin with Members,Clantag,Leader,... my Config should look like http://hastebin.com/ulamusodej.py
    I have the problem if somebody accepts the Claninvite it should add the Player like: "tag.Member." + p.getUUID.toString, p.getName. But it doesnt work... Here is my actual code: http://hastebin.com/kihuwabuca.avrasm

    Need help :D
    ~Kiwanga
     
  2. Offline

    mcdorli

    Why is this static?
     
  3. I use it in my command class, which is in another package
     
  4. Offline

    mcdorli

    Is that the only reason? Then it shouldn't be. You should create a new instance of it, and use that with non-static methods. Packages only enables to keep your project in order.
     
  5. Yeah ok i will change it but it still doesn't solve my problem
     
  6. Offline

    mcdorli

    Errors? Do the method gets called? Can you post the full code?
     
  7. no there are no errors i just want to know how i can get hashmaps in a list from a config and set them back as List :D
     
  8. Offline

    mcdorli

    You need to save the hashmaps manually. Or use @Chloe-chan's library for it (google please, I'm lazy to search for it myself)
     
  9. Offline

    Chloe-chan

  10. Offline

    Betagear

    Try using saveConfig(); instead of saveAll();
     
  11. Offline

    DoggyCode™

    For a plugin like this I'd actually suggest reading from and saving to a JSON file, like factions does. Then only use the config.yml for simple stuff such as options. Like Factions does. This way, you could assign unique IDs and such to specific clans. Simple management.
     
Thread Status:
Not open for further replies.

Share This Page