Untitled diff
18 lines
command /inventaire [<player>]:
command /invview <player>:
permission: inventaire.use
permission: invview.view
permission message: &7Tu n'a pas la acces a cette commande !
trigger:
trigger:
open chest with 6 rows named "&2[&6inv&lView&r&2] &2%arg 1%" to player
set {target.%player%} to arg
set {_playerinv} to arg 1
open chest with 4 rows named "%arg%" to player
set {_slot} to 0
set {_playerinv} to arg
loop 36 times:
set {_slot} to 0
set {invview.%arg 1%.%{_slot}%} to slot {_slot} of arg 1's inventory
loop 36 times:
add 1 to {_slot}
set {view.%arg%.%{_slot}%} to slot {_slot} of arg's inventory
set {_slot} to 0
add 1 to {_slot}
set {_slotmenu} to 18
set {_slot} to 0
wait 1 tick
set {_slotmenu} to 0
loop 36 times:
wait 1 tick
format slot {_slotmenu} of player with {invview.%arg 1%.%{_slot}%} to close
loop 36 times:
add 1 to {_slot}
format slot {_slotmenu} of player with {view.%arg%.%{_slot}%} to be unstealable
add 1 to {_slotmenu}
add 1 to {_slot}
set {_health.%arg 1%} to arg 1's health
add 1 to {_slotmenu}
set {_hunger.%arg 1%} to arg 1's hunger
set {armorview.helmet.%arg 1%} to arg 1's helmet
set {armorview.chestplate.%arg 1%} to arg 1's chestplate
set {armorview.leggings.%arg 1%} to arg 1's leggings
set {armorview.boots.%arg 1%} to arg 1's boots
format slot 4 of player with arg 1's skull named "&6%arg 1%> &4%{_health.%arg 1%}% ❤" with lore "&c&k[]&r&4Inventaire&c&k[]-" to close
format slot 14 of player with raw chicken named "&a&lFaim:&r &6%{_hunger.%arg 1%}%" to close
format slot 12 of player with iron chestplate named "&a&lArmure:" with lore "&6%{armorview.helmet.%arg 1%}%||&6%{armorview.chestplate.%arg 1%}%||&6%{armorview.leggings.%arg 1%}%||&6%{armorview.boots.%arg 1%}%" to close