Do not crash when reading null planets

This commit is contained in:
Anuken
2023-06-17 20:39:52 -04:00
parent 70516752fc
commit 7e23272668
2 changed files with 4 additions and 1 deletions

View File

@@ -195,6 +195,9 @@ public class JsonIO{
@Override
public Planet read(Json json, JsonValue jsonData, Class type){
if(jsonData.asString() == null){
return null;
}
Planet block = Vars.content.getByName(ContentType.planet, jsonData.asString());
return block == null ? Planets.serpulo : block;
}