@Override public void load(Model model) { super.load(model); equippedWeapon = model.getInstanceOptional(EQUIPPED_ITEM); equippedArmor = model.getInstanceOptional(EQUIPPED_ARMOR); }
@Override public Model save() { Model save = super.save(); save.putInstance(EQUIPPED_ITEM, equippedWeapon.orNull()); save.putInstance(EQUIPPED_ARMOR, equippedArmor.orNull()); return save; }