Supported MC version 1.20.1 - 26.1.2
You and your friends will start out with 8 lives (configurable) and need to team up to survive. At the beginning there is a grace period where no one will lose lives, after a configurable amount of time you will lose Grace Period and start to lose lives on death. This is meant to be a fun gamemode or tool for server owners if they would like a lightly configurable experience. You are able to revive teammates in the same team and add lives to yourself. More info on set up if you keep reading.
--------------------------------------------------------------------------------------------------------------
Setup:
1. Add players to the teams that come with the datapack.
/team join <teamname> <playername>

2. Set Grace Period time or toggle it off.
/scoreboard players set GracePeriodCountDown TLConfig <1-6>
1= 5 minutes
2= 10 minutes
3= 20 minutes
4= 30 minutes
5= 1 hour
6= 2 hours
/function teamlives:gracetoggle
Setting a time will automatically toggle grace off when the countdown ends.
--------------------------------------------------------------------------------------------------------------
Player Commands:
/trigger revive
This will try to revive a player that is online and in the same team as you.
/trigger addlife
This will give you an extra life at the cost of a nether star (nether star must be in offhand)
--------------------------------------------------------------------------------------------------------------
Optional Settings
Prevent "dead" players from leaving spawn
/function teamlives:marker
This command will set a marker where you are standing and will not let players go far away from it. (If you want to move it make sure you kill the marker entity tagged <DeathZoneMarker> the last one.)
Turn life loss off for specific players
/scoreboard players set <playername> LifeLoss 0
This command allows you to turn off life loss on death for the specific player you want.
Team starting lives
Found in TeamLivesV-1.0\1.21-26.1\data\teamlives\function\load.mcfunction
Change the last number on line 8 to set how many lives players who join for the first time are set to
--------------------------------------------------------------------------------------------------------------
If you are running a server
This data pack will not pass Grace Period time if the server is paused or if it is offline. Change this property so that if no one is online players timers continue to go down.
pause-when-empty-seconds=-1
Another thing you can do to prevent server lag is prevent spectators from generating chunks.
/gamerule spectatorsGenerateChunks false