Limited Lives 1.15.2-1.14.4 mod will allow you to set the number of lives for each world. By default, with each death the number of hearts will decrease by one until you waste them completely.
When you run out of life, depending on configuration, you may be transferred to being a spectator or banned on the server for a while.
How to install Limited Lives
- Download and install Minecraft Forge
- Download mod
- Unzip it and copy to C:\Users\User_Name\AppData\ Roaming\.minecraft\mods