So, I just created a new world. I collected resources and when i created a shield a x-ray screen came. So I decided to restart my world but unfortunately it was still there.
Procedure to fix it:
1. Leave the world.
2.Close Minecraft.
3. Restart your Minecraft world.