How can I detect when a player hits another player in 1.20.2 datapacks?
I'm trying to make it so that when a player (not a mob) hits another player, both players loose their elytra and can't fly away from the fight. I want to add a timer as well so that the datapack re-enables elytra after 60 seconds unless the player gets hit again. If they're hit agin the timer refreshes. Where would I start for creating a datapack like this? (I've seen it on a lot of lifesteal servers on yt but can't find any tutorials on it)
Continue to help post