options:
prefix: &7[&3Arene&7]
colorcode: &c
highlightcolor: &6
permisionmessage: {@prefix} {@colorcode}You are not allowed to do that.
variables:
{player} = 0
command /join Arene Zeus:
permission: "inv.save"
permission message: "{@permisionmessage}"
aliases: setinventory
trigger:
if {player} is less than 0:
set {player} to 0
if player is in world "world":
add 1 to {player}
set {number.%player%} to {player}
set {_count} to 0
loop 45 times:
set {inv.%player%.%{_count}%.Zeus} to slot {_count} of player's inventory
add 1 to {_count}
set {inv.%player%.helmet.Zeus} to player's helmet
set {inv.%player%.chest.Zeus} to player's chestplate
set {inv.%player%.legs.Zeus} to player's leggings
set {inv.%player%.feet.Zeus} to player's boots
set {inv.%player%.health.Zeus} to the player's health
set {inv.%player%.hunger.Zeus} to the player's hunger bar
set {inv.%player%.level.Zeus} to the player's level
message "{@prefix} {@colorcode}Inventory set to Zeus %{player}% and %{number.%player%}%"
wait a tick
clear player' inventory
execute console command "/gamemode survival %player%"
execute console command "/heal %player%"
execute console command "minecraft:give %player% minecraft:trident{Unbreakable:1]} 1"
wait a tick
if {number.%player%} is 3:
set {_l} to location (345.5, 21, 1.5) in world "Arenes"
set yaw of {_l} to 90
set pitch of {_l} to -1.5
teleport player to {_l}
if {number.%player%} is 2:
set {_l} to location (328.5, 20, 1.5) in world "Arenes"
set yaw of {_l} to 90
set pitch of {_l} to -1.5
teleport player to {_l}
if {number.%player%} is 1:
set {_l} to location (337.5, 12, -5.5) in world "Arenes"
set yaw of {_l} to 90
set pitch of {_l} to -1.5
teleport player to {_l}
if {number.%player%} is 4:
set {_l} to location (328.5, 12, 13.5) in world "Arenes"
set yaw of {_l} to 90
set pitch of {_l} to -1.5
teleport player to {_l}
else:
message "{@prefix} {@colorcode}Tu es deja dans l'arene Zeus"
command /leave Arene Zeus:
permission: "inv.recall"
permission message: "{@permisionmessage}"
aliases: inventory
trigger:
add -1 to {player}
set {_l} to location (-24.5, 74, -0.5) in world "world"
set yaw of {_l} to 0.0
set pitch of {_l} to 0.0
teleport player to {_l}
wait 2 tick
set {_count} to 0
loop 45 times:
set slot {_count} of player's inventory to {inv.%player%.%{_count}%.Zeus}
add 1 to {_count}
set the helmet of player to {inv.%player%.helmet.Zeus}
set the chestplate of player to {inv.%player%.chest.Zeus}
set the leggings of player to {inv.%player%.legs.Zeus}
set the boots of player to {inv.%player%.feet.Zeus}
set the health of player to {inv.%player%.health.Zeus}
set the hunger of player to {inv.%player%.hunger.Zeus}
set the level of player to {inv.%player%.level.Zeus}
wait a tick
clear {Inventory.%player%::*}
clear {Inventory.%player%::Zeus}
clear {Inventory.%player%::zeus}
message "{@prefix} {@colorcode}Your inventory has been changed to Zeus."
stop
command /delinv [<text>]:
permission: "inv.delete"
permission message: "{@permisionmessage}"
aliases: deleteinventory
trigger:
if argument 1 is not set:
make player execute command "inv help"
stop
if argument 1 is "all":
clear {inv.%player%::Zeus}
message "{@prefix} {@colorcode}All inventories removed"
stop
remove argument 1 from {inv.%player%::Zeus}
message "{@prefix} {@colorcode}Inventory %arg 1% removed"
stop
Voila, la commande en question est dans le "/join arene zeus"
Ah et si il y a plusieurs clear inventory c'est parce que je trouve pas la commande qui clear la variable inventaire du joueur et que je fais des tests x)