mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-25 22:11:32 +01:00
Optimize code
This commit is contained in:
parent
736ac43868
commit
ecd5d18818
@ -49,15 +49,11 @@ public abstract class AbstractSave {
|
||||
*/
|
||||
public void init() {
|
||||
if (file.exists()) {
|
||||
JsonObject parentNode = null;
|
||||
try (final FileReader fr = new FileReader(file)) {
|
||||
parentNode = GSON.fromJson(fr, JsonObject.class);
|
||||
read(GSON.fromJson(fr, JsonObject.class));
|
||||
} catch (Exception e) {
|
||||
ViaFabricPlus.global().getLogger().error("Failed to read file: " + file.getName() + "!");
|
||||
}
|
||||
if (parentNode != null) {
|
||||
read(parentNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user