To disable Fire damage in Minecraft, you will need to use a gamerule command. 

Before you can use commands in Minecraft, you will need to enable cheats via the option to do so in the main menu or when you go to create a brand new Minecraft world.

Once cheats and commands are enabled, all you need to do to disable fire damage is type or copy and paste  /gamerule fireDamage false and hit enter.

Doing so will then prevent all fire sources from harming you in the game. This includes fire enchantments, lava, and fire charges and flint and stone, and the like.

If you want to use this command for a server, all you need to do is locate your Server console and paste or type the same command in, and it will have the same effect, just like with client-side games.

But if you ever want to revert the changes made to fire damage, all you need to do is copy and paste /gamerule fireDamage but instead of false type true at the end. 

Overall, we recommend using this command if you hate losing items in lava, as it is always a pain to die like that, but, it may prove too cheaty for some players.

Check out some of our other awesome Minecraft guides!