add command casque/hat

This commit is contained in:
Mylloon 2021-06-28 00:50:42 +02:00
parent 35cce81f02
commit efaad1d5f1

19
main.sk
View file

@ -390,3 +390,22 @@ every 0.5 second in "world": # dé à coudre
teleport loop-player to location at 101.5, 83, -314 in world "world" teleport loop-player to location at 101.5, 83, -314 in world "world"
feed loop-player feed loop-player
heal loop-player heal loop-player
command casque:
executable by: players
aliases: hat
description: Équipe l'objet dans ta main principale sur ta tête.
trigger:
if player is op:
if tool of player is air:
send "&4Tu n'as rien dans tes mains."
stop
set {_item} to air
if helmet of player is not air:
set {_item} to helmet of player
set helmet of player to tool of player
remove tool of player from inventory of player
add {_item} to inventory of player
send "&aItem équippé !"
else:
send {@errorMessage}