Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-113255

Server does not test if some files exist before trying to interact with them

XMLWordPrintable

    • Confirmed

      The bug

      The server does not test if all files it needs for startup exists. For some of them it just assumes they exist and if they don't it prints an error message.
      This can be pretty confusing because you only download the single server .jar file and therefor these files are always missing when you start the server for the first time.

      [20:34:39 WARN]: Failed to load white-list: 
      java.io.FileNotFoundException: whitelist.json (The system cannot find the file specified)
      	at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_121]
      	at java.io.FileInputStream.open(Unknown Source) ~[?:1.8.0_121]
      	at java.io.FileInputStream.<init>(Unknown Source) ~[?:1.8.0_121]
      	at com.google.common.io.Files.newReader(Files.java:86) ~[minecraft_server.1.11.2.jar:?]
      	at net.minecraft.server.management.UserList.readSavedFile(UserList.java:193) ~[bin/:?]
      	at net.minecraft.server.dedicated.DedicatedPlayerList.readWhiteList(DedicatedPlayerList.java:152) [bin/:?]
      	at net.minecraft.server.dedicated.DedicatedPlayerList.<init>(DedicatedPlayerList.java:31) [bin/:?]
      	at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:211) [bin/:?]
      	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:531) [bin/:?]
      	at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
      

      Expected behavior

      The server tests if a file exists and if not creates it and maybe prints an info message that it created the file.

      Affected files

      • banned-players.json
      • banned-ips.json
      • ops.json
      • whitelist.json

            dinnerbone [Mojang] Nathan Adams
            marcono1234 [Mod] Marcono1234
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: