command /inv1:
trigger:
set {inventory1.%player%} to player's serialized inventory
set {h1.%player%} to the helmet of player
set {c1.%player%} to the chestplate of player
set {l1.%player%} to the leggings of player
set {b1.%player%} to the the boots of player
set {f1.%player%} to the player hunger bar
set {v1.%player%} to the player's health
set {xp1.%player%} to the player's level
wait 3 ticks
clear player's inventory
restore inventory of player from {inventory2.%player%}
equip player with {h2.%player%}
equip player with {c2.%player%}
equip player with {l2.%player%}
equip player with {b2.%player%}
set the player's hunger bar to {f2.%player%}
set the player's health to {v2.%player%}
set player's level to {xp2.%player%}
command /inv2:
trigger:
set {inventory2.%player%} to player's serialized inventory
set {h2.%player%} to the helmet of player
set {c2.%player%} to the chestplate of player
set {l2.%player%} to the leggings of player
set {b2.%player%} to the the boots of player
set {f2.%player%} to the player hunger bar
set {v2.%player%} to the player's health
set {xp2.%player%} to the player's level
wait 3 ticks
clear player's inventory
restore inventory of player from {inventory1.%player%}
equip player with {h1.%player%}
equip player with {c1.%player%}
equip player with {l1.%player%}
equip player with {b1.%player%}
set the player's hunger bar to {f1.%player%}
set the player's health to {v1.%player%}
set player's level to {xp1.%player%}
Si je t'ai aidé n'hésites pas à mettre un like:)