diff --git a/src/main/java/com/viaversion/viafabricplus/save/AbstractSave.java b/src/main/java/com/viaversion/viafabricplus/save/AbstractSave.java index a3b16ae5..90570b6b 100644 --- a/src/main/java/com/viaversion/viafabricplus/save/AbstractSave.java +++ b/src/main/java/com/viaversion/viafabricplus/save/AbstractSave.java @@ -54,7 +54,12 @@ public AbstractSave(final String name) { public void init() { if (Files.exists(path)) { try { - read(GSON.fromJson(Files.readString(path), JsonObject.class)); + final JsonObject object = GSON.fromJson(Files.readString(path), JsonObject.class); + if (object != null) { + read(object); + } else { + ViaFabricPlusImpl.INSTANCE.logger().error("The file {} is empty!", path.getFileName()); + } } catch (IOException e) { ViaFabricPlusImpl.INSTANCE.logger().error("Failed to read file: {}!", path.getFileName(), e); }