Energy and momentum are always conserved. Kinetic energy is not conserved in an inelastic collision, but that is because it is converted to another form of energy (heat, etc.). The sum of all types of energy (including kinetic) is the same before and after the collision.