What's the best practice to save/load multiple locations?

Discussion in 'Plugin Development' started by chiisana, Dec 23, 2012.

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

    chiisana

    I'm trying to make my plugin capable of saving and loading multiple (arbitrary amount) locations. A sample config would preferably be something like this:

    Show Spoiler

    Code:
    MyArea:
        Points: [[0, 64, 0], [0, 64, 10], [10, 64, 10], [10, 64, 0]]
    AnotherArea:
        Points: [[0, 64, 0], [0, 64, 10], [10, 64, 10], [10, 64, 5], [5, 64, 5]]
    
    (Valid against YAML Lint)


    I haven't found any relevant API code for saving and loading locations in the bukkit API, nor have I found proper ways to load List of Lists. Any tips?
     
  2. Offline

    ImDeJay

    List(String) blah = this.getconfig().getStringList(Path);

    will load a list.
     
Thread Status:
Not open for further replies.

Share This Page