How to let player breathe underwater
I am working on a map and the player needs to explore underwater for a long time, so is there any way to keep the player from dying or being hurt from lack of air when exploring underwater for a long time?
The Water Breathing effect will prevent players from losing oxygen underwater:
/effect USERNAME minecraft:water_breathing 1000000 0 true
I just downloaded a Addons called the “Mysterious sea addon” on mcpe addons and there is a helmet in the game (which is actually the creeper skull) called the “Diving Helmet Mk 2” and when you put it on under water it gives you infinite water breathing. Although when I played I thought it looked weird so when I took it off under water I still had the effect even if I went up to get some air it still gave me the effect I hope this helps in any way.
In 1.13.1 the console command to breathe underwater is
/effect give [playername] minecraft:water_breathing [effect duration in seconds]
also try the Conduit Power Effect which gives you improved underwater vision, water breathing and underwater mining speed:
/effect give [player name] minecraft:conduit_power [effect duration in seconds]