command /builduhc:
permission: builduhc.use
permission message: &cYou don't have acces to this command.
trigger:
if {uhc.%player%} is not set:
set {uhc.%player%} to true
teleport the player to {builduhc}
clear player's inventory
give player 1 diamond sword of sharpness 3
give player 1 fishing rod
give player 1 bow of power 2
give player 6 golden apple
give player 3 golden apple named "&2Golden Head"
give player 1 lava bucket
give player 1 lava bucket
give player 1 water bucket
give player 64 cobblestone
give player 64 oak wood planks
give player 32 arrow
give player 1 water bucket
equip player with diamond helmet of projectile protection 2
equip player with diamond chestplate of protection 2
equip player with diamond leggings of protection 2
equip player with diamond boots of projectile protection 2
else:
send "&c&lWarning: &4Commandes impossible"
on death:
if victim is a player:
if attacker is a player:
if victim's world is "builduhc":
if attacker's world is "builduhc":
give attacker 2 golden apple
give attacker 1 golden apple named "&2Golden Head"
on death:
if victim is a player:
if victim's world is "builduhc":
delete {uhc.%victim%}
on consume a golden apple:
if item is golden apple named "&2Golden Head":
apply regeneration 2 to the player for 10 seconds
apply Absorption 1 to the player for 90 seconds
on load:
register new shapeless recipe for golden apple named "&2Golden Head" using Gold ingot, Gold ingot, Gold ingot, Gold ingot, player head, Gold ingot, Gold ingot, Gold ingot, Gold ingot
command /setbuilduhc:
permission: set.builduhc
trigger:
set {builduhc} to location of player
send "&aTu a mis en place le spawn du builduhc" to player