Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6722

World folder deletion bug

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • CraftBukkit version 3227-Spigot-3c1fc60-a0a37f4 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
    • Any world-management plugin
    • Yes

      First of all, it is worth mentioning that all actions are performed with the server always running.
      The problem is that when you delete a folder of the world (after unloading this world), this folder is only partially deleted. The folders "entities" and "poi" remain, which contain ".mca" files.
      They cannot be removed even manually(when server is running). I also noticed that the ".mca" files disappear on their own some time later(about 1 hour). So, since this cleanup method exists somewhere, I think it should be executed directly in the Bukkit # unloadWorld method.

      And if u create a new world with same name BEFORE ".mca" files will be removed, this will give a huge(5000 lines) crash in the console "Failed to read chunk [x, z]", "java.nio.file.AccessDeniedException: world2\entities\r.-1.0.mca".

      How do I get the error?
      1. Create an additional world. And teleport into it. (With bukkit WorldCreator)
      2. Summon any entity and wait for world-saving. (or use /save-all command)
      3. Teleport into main world.
      4. Unload the additional world. (Bukkit.unloadWorld("worldname", false);)
      5. Using any method, delete the folder with the additional world and all the files it contains.
      6. Done. See that the folder is not completely deleted. It contains the "entities" folder, which contains "r.0.-1.mca" (Or something like that).
      7. Now, when creating and load a new world with the same name, you will get a huge error in the console.

      I'm sure it shouldn't work that way, we should have free access to delete worlds like on 1.12.2.

            Unassigned Unassigned
            Abcik Sergey Maliy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: