1.8.8 If I read a file multiple times with different plugins, will I get an error?

Discussion in 'Spigot Plugin Development' started by DJCowGaming, Jun 13, 2021.

  1. I'm working on some plugins for a server I want to start with a friend, and before I write anything major, I need to know something about how the Bukkit yml system works. If I load a yml file multiple times with YamlConfiguration.loadConfiguration(file); will I get an error? If so, I'm just going to go with Json.
  2. No, you can read files as many times as you want.
  3. No, you will not get an error, but you will get probelms if you try to save multiple configuarations to the same file as they will override each other. What is the purpose of loading the same yml file multiple times though?
  4. Multiple plugins reading the same file, I'm worried that it might cause some issues with files being open and trying to read them.
  5. ???

    The file can't be open multiple times, you just get some data from another plugin's config.
    • Funny Funny x 1
  6. ???

    Lol that‘s just completely wrong.

    Example, works totally fine:

    Code (Java):

    final YamlConfiguration c1 = YamlConfiguration.loadConfiguration(new File(„file.yml);
    final YamlConfiguration c2 = YamlConfiguration.loadConfiguration(new File(„file.yml);