diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityDeserializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityDeserializer.java index 1dbcb5e..9996394 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityDeserializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityDeserializer.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.databind.*; import uulm.teamname.marvelous.gamelibrary.IntVector2; import uulm.teamname.marvelous.gamelibrary.entities.*; import uulm.teamname.marvelous.gamelibrary.entities.Character; -import uulm.teamname.marvelous.gamelibrary.json.config.CharacterConfig; -import uulm.teamname.marvelous.gamelibrary.json.config.CharacterProperties; +import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig; +import uulm.teamname.marvelous.gamelibrary.config.CharacterProperties; import uulm.teamname.marvelous.gamelibrary.json.ingame.SerializedEntityType; import java.io.IOException; @@ -37,6 +37,8 @@ public class EntityDeserializer extends JsonDeserializer { CharacterProperties properties = config.getMap().get(characterName); + if (properties == null) throw new IOException("Non-existent Character in Event"); + result = new Character( id, codec.treeToValue(node.get("position"), IntVector2.class),