Solved ConfigurationSection to string

Discussion in 'Spigot Plugin Development' started by Nicbo, Feb 11, 2020.

  1. Hey guys,

    So I'm working on a config command for a minigame plugin and one of the commands will show how the game is configured.


    Just wondering if there is an easy way to have a configurationsection made into a string/string list like the one above.
  2. FIleConfiguration#getStringList
  3. You can read lines from the file using a BufferedReader
    • Useful Useful x 1
  4. u cann use ArrayLists to u Fileconfiguration

    Code (Text):
            List<String> list = new ArrayList();
            cfg.addDefault("ABC.TEST.COMMAND", list);
  5. I think he wants to take the text in the file and print that in chat, not add a list to the file.
    Adding to what I mentioned before, here are some examples:
    • Like Like x 1
    • Creative Creative x 1
  6. but Arraylist on Config is easier or not? :D
  7. No

    Loop through your configuration section and getting the values and use a string builder.
    I'm gonna post a code later.