Solved Adding / Removing a single item from config.yml

Discussion in 'Plugin Development' started by bigbeno37, Oct 12, 2013.

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

    bigbeno37

    Hey y'all,

    So, I've got this plugin, right, that requires that a section in the config to be added / retracted to. However, I can't find any methods that do this. You see, I want to, for instance, add a name to a list, or subtract a certain name from that list. When I try using getConfig().set(), it sets the entire list to what I put in.

    Any ideas on how I can get around this?
     
  2. Offline

    Mathias Eklund

  3. Offline

    bigbeno37

    Figured it out. What I did was set an ArrayList to the contents of the list in the config file, use that instead of the actual config, and at onDisable(), set the contents of the list to the ArrayList.
     
Thread Status:
Not open for further replies.

Share This Page