Solved Get level.dat from a World instance.

Discussion in 'Spigot Plugin Development' started by BadBoy6767, Jan 10, 2017.

  1. I have an instance of World, and I would like to get the level.dat file of this World.
    I cannot do something like
    Code (Text):
    new File(Bukkit.getServer().getWorldContainer(), myWorld.getName() + "\level.dat")
    since World.getName returns the name and not the folder name.

    What else can I do?
  2. Isn't the folder name just the name of the world in lower case?
  3. Not necessarily, it can be easily changed. (And it is pretty often)