Overriding Config(Not Solved)

Discussion in 'BungeeCord Plugin Development' started by Forbidden391, Apr 30, 2017.

  1. So basically when i type this code
    Code (Text):
    public void addString(String string) {
            List<String> list = config.getStringList("Channels.links");
            list.add(string);
            config.set("Channels.links", list);
            try {
                configp.save(config, configfile);
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    And use it in this command class:

    https://hastebin.com/emijebukut.scala

    When I run it in game it overrides the config and makes the StringList blank. Anyone know how to fix?

    Thanks in advanced to anyone who helps :D
     
    #1 Forbidden391, Apr 30, 2017
    Last edited: Apr 30, 2017
  2. Did you check if config.getStringList("Channels.links") gives an output?
    And how is configp declared?