I'm trying to make a PVP area on my realm away from the main area using command blocks to teleport to the designated area. However I would also like it to clear the players inventory so they don't get a head start. I've tried using Command Combiners, but none of them seem to work, they just spawn some gravel and a minecart + cmd block. The specific commands I'm trying to combine are:
/tp @p 98338 156 84729
and /clear @p
.
The cmd combiners gave me this command, but it did not work:
summon falling_block ~ ~1 ~ {BlockState:{Name:stone},Time:1,Passengers:[{id:falling_block,BlockState:{Name:redstone_block},Time:1,Passengers:[{id:falling_block,BlockState:{Name:activator_rail},Time:1,Passengers:[{id:command_block_minecart,Command:"gamerule commandBlockOutput false"},{id:command_block_minecart,Command:"fill ~2 ~-3 ~-1 ~5 ~-1 ~1 light_gray_terracotta hollow"},{id:command_block_minecart,Command:"fill ~2 ~-2 ~-1 ~5 ~-2 ~1 white_stained_glass replace light_gray_terracotta"},{id:command_block_minecart,Command:"fill ~3 ~-2 ~ ~4 ~-2 ~ chain_command_block[facing=east]"},{id:command_block_minecart,Command:"setblock ~3 ~-2 ~ repeating_command_block[facing=east]"},{id:command_block_minecart,Command:"data merge block ~4 ~-2 ~ {auto:1,Command:\"/clear\"}"},{id:command_block_minecart,Command:"data merge block ~3 ~-2 ~ {auto:1,Command:\"/tp 98338 156 84729\"}"},{id:command_block_minecart,Command:"setblock ~ ~ ~1 command_block{Command:\"fill ~ ~-3 ~-1 ~ ~ ~ air\"}"},{id:command_block_minecart,Command:"setblock ~ ~-1 ~1 redstone_block"},{id:command_block_minecart,Command:"kill @e[type=command_block_minecart,distance=..1]"}]}]}]}
Is there anything wrong with this and how would I fix it?
I'm on Java Edition if that matters.
Here is an expanded version of that command:
summon falling_block ~ ~1 ~
{
BlockState:
{
Name:stone
},
Time:1,
Passengers:
[
{
id:falling_block,
BlockState:
{
Name:redstone_block
},
Time:1,
Passengers:
[
{
id:falling_block,
BlockState:
{
Name:activator_rail
},
Time:1,
Passengers:
[
{
id:command_block_minecart,
Command:"gamerule commandBlockOutput false"
},
{
id:command_block_minecart,
Command:"fill ~2 ~-3 ~-1 ~5 ~-1 ~1 light_gray_terracotta hollow"
},
{
id:command_block_minecart,
Command:"fill ~2 ~-2 ~-1 ~5 ~-2 ~1 white_stained_glass replace light_gray_terracotta"
},
{
id:command_block_minecart,
Command:"fill ~3 ~-2 ~ ~4 ~-2 ~ chain_command_block[facing=east]"
},
{
id:command_block_minecart,
Command:"setblock ~3 ~-2 ~ repeating_command_block[facing=east]"
},
{
id:command_block_minecart,
Command:"data merge block ~4 ~-2 ~ {auto:1,Command:\"/clear\"}"
},
{
id:command_block_minecart,
Command:"data merge block ~3 ~-2 ~ {auto:1,Command:\"/tp 98338 156 84729\"}"
},
{
id:command_block_minecart,
Command:"setblock ~ ~ ~1 command_block{Command:\"fill ~ ~-3 ~-1 ~ ~ ~ air\"}"
},
{
id:command_block_minecart,
Command:"setblock ~ ~-1 ~1 redstone_block"
},
{
id:command_block_minecart,
Command:"kill @e[type=command_block_minecart,distance=..1]"
}
]
}
]
}
]
}
Best Answer
https://mrgarretto.com/cmdcombiner This website combines commands together. Similar to only 1 command. I don’t know if this will help but it’s all I can offer.