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

Warning when deleting world files before loading it.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • OS: Windows 10

    • CraftBukkit version 3597-Spigot-4aa5ead-aaf484f (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT)
    • Yes

      In fact I don't know if I should expect this to be fixed. Because it's not really a bug. However, I will leave this report.

      I'm also not the first to encounter this. https://www.spigotmc.org/threads/failed-to-write-world-uid-dat.480727/

      All of the following applies only to the main world. ("level-name" at server.properties)
      So, I want the old world to be completely deleted when the server starts, and a new one is generated instead. To do this, I wrote a plugin in which I delete the default world folder and all attached files in method onEnable with plugin.yml load: STARTUP.
      But after deletion, when it comes to generating a new world i get a warning:

      [03:22:34] [Server thread/WARN]: Failed to write .\bingo\uid.dat
      java.io.FileNotFoundException: .\world\uid.dat (The system cannot find the specified path)
              at java.io.FileOutputStream.open0(Native Method) ~[?:?]
              at java.io.FileOutputStream.open(FileOutputStream.java:293) ~[?:?]
              at java.io.FileOutputStream.<init>(FileOutputStream.java:235) ~[?:?]
              at java.io.FileOutputStream.<init>(FileOutputStream.java:184) ~[?:?]
              at org.bukkit.craftbukkit.v1_19_R1.util.WorldUUID.getUUID(WorldUUID.java:42) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3597-Spigot-4aa5ead-aaf484f]
              at org.bukkit.craftbukkit.v1_19_R1.generator.CraftWorldInfo.<init>(CraftWorldInfo.java:23) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3597-Spigot-4aa5ead-aaf484f]
              at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:544) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3597-Spigot-4aa5ead-aaf484f]
              at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:403) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3597-Spigot-4aa5ead-aaf484f]
              at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:255) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3597-Spigot-4aa5ead-aaf484f]
              at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:968) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3597-Spigot-4aa5ead-aaf484f]
              at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:293) ~[spigot-1.19.2-R0.1-SNAPSHOT.jar:3597-Spigot-4aa5ead-aaf484f]
              at java.lang.Thread.run(Thread.java:833) [?:?] 

      and the world is loading, but I'm not sure if everything works as I planned, and if I'm breaking something because of this warning.
      I understand that the warning is not an error, however I am afraid that something is wrong here.

      Thank you for your attention.

       

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

              Created:
              Updated: