How to make a PVP timer in Minecraft (JAVA)

Channel:
Subscribers:
1,440
Published on ● Video Link: https://www.youtube.com/watch?v=prRJuUtm_YA



Category:
Guide
Duration: 6:36
115 views
3


Today I will show you how to make a timer that can be random or set that turns on and off PVP. This can be hooked up to lifesteal or friends or foe types of commands.

COMMANDS:
/scoreboard objectives add Timer dummy

/team add PVP

/team join PVP @a

/scoreboard players add @e Timer 1

/execute if score @a[limit=1] Timer matches 50.. run scoreboard players set @e Timer 0

/execute at @e[sort=random,limit=1,name=Random] run setblock ~ ~2 ~ minecraft:redstone_block

/team modify PVP friendlyFire true

/team modify PVP friendlyFire false

/setblock ~ ~-2 ~ air