# Add a cooldown for tnt
on join:
if {tnt.cooldown.%player%} is set:
delete {arrow.cooldown.%player%}
on right click with tnt:
if {tnt.cooldown.%player%} is set:
cancel event
else:
if player's gamemode is not creative:
set {tnt.cooldown.%player%} to true
wait 0.19 seconds
delete {tnt.cooldown.%player%}
# Auto ignit tnt
on place of tnt:
# if tnt is named "_primed"
if name of player's held item is "_primed":
cancel event
if player's gamemode is not creative:
remove 1 tnt named "_primed" from player
spawn primed tnt at event-location
# if tnt contains lore "§cprimed" (&cprimed)
if lore of player's held item contains "§cprimed":
cancel event
if player's gamemode is not creative:
remove 1 tnt from player
spawn primed tnt at event-location