Solved Nooby question of config

Discussion in 'Plugin Development' started by BetaNyan, Oct 13, 2014.

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

    BetaNyan

    It's really late at night and I am trying to make a method to create list. I can't find any Bukkit methods.

    Code:
    public List<?> getList(String path) {
            return config.getList(path);
        }
       
        public void createList(String path) {
            config.createPath(path); // This just creates line, how do I create a list? I also tried createSection too
        }
     
  2. Offline

    fireblast709

    BetaNyan just use set(path, value), where value is a List.
     
  3. Offline

    BetaNyan

    Code:
     public void createList(String path) {
            List<String> l = new ArrayList<String>();
            l.add("test");
            config.set(path, l);
        } 
    Didnt work :(
     
  4. Offline

    teej107

  5. Offline

    BetaNyan

    OMG I forgot! LOL, Thank you!
     
Thread Status:
Not open for further replies.

Share This Page