- https:
This commit is contained in:
Nut.andor
2022-09-03 23:01:43 +02:00
parent 0f20f0cd6d
commit 7ae4d9d3f6
8 changed files with 17 additions and 11 deletions

View File

@@ -38,11 +38,16 @@ public abstract class JSONElement extends GameDataElement {
for (Object obj : gameDataElements) {
Map jsonObj = (Map)obj;
String id = (String) jsonObj.get("id");
try {
if (id != null && id.equals(this.id )) {
this.parse(jsonObj);
this.state = State.parsed;
break;
}
}
catch(Exception e){
System.out.println("Error in ID: " + id);
}
}
} catch (FileNotFoundException e) {
Notification.addError("Error while parsing JSON file "+jsonFile.getAbsolutePath()+": "+e.getMessage());