Browse Source

Try Catch

combat-2
MagicBot 9 months ago
parent
commit
d363a9fc1b
  1. 5
      src/engine/objects/ItemTemplate.java

5
src/engine/objects/ItemTemplate.java

@ -12,6 +12,7 @@ import engine.Enum; @@ -12,6 +12,7 @@ import engine.Enum;
import engine.math.Vector3fImmutable;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.pmw.tinylog.Logger;
import java.util.EnumSet;
import java.util.HashMap;
@ -54,6 +55,7 @@ public class ItemTemplate { @@ -54,6 +55,7 @@ public class ItemTemplate {
public ItemTemplate(JSONObject jsonObject) {
try {
// Reading a String
obj_name = (String) jsonObject.get("obj_name");
@ -163,6 +165,9 @@ public class ItemTemplate { @@ -163,6 +165,9 @@ public class ItemTemplate {
int skill_level = ((Long) skill_req.get("skill_level")).intValue();
item_skill_required.put(Enum.CharacterSkills.valueOf(skill_type), skill_level);
}
} catch (Exception e) {
Logger.error(e);
}
}

Loading…
Cancel
Save