This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hello,
I am building a custom pvp map where players are assigned to teams. Each team has its own colored chest piece give to the players via command block using the example following command:
replaceitem entity @p armor.chest leather_chestplate{display:{Name:"\"Blue Team\"",color:3949738},Enchantments:[{id:binding_curse,lvl:1},{id:vanishing_curse,lvl:1}]} 1
I have 6 teams and with 6 separate repeating command blocks I am testing for each cosponsoring leather armor.
My problem is, I can only seem to get a @p (nearest player) command to work, and I need a @a command
this was my @p:
execute if data entity @p Inventory[{Slot:102b,tag:{display:{color:3949738}}}]
have tired various methods to detect the armor, by name, by color, but cannot get it to work.
Please help and much love in advance
To detect multiple players using data, you need to execute the data command for each player, hence:
/execute as @a if data get entity @s Inventory[{Slot:102b,tag:{display:{color:3949738}}}]
(Wont reply until like 10 hrs cus going to sleep now)
Thank you for this.
"get" isn't recognized as a command in that line :/
Quote from TotalRico_» "get" isn't recognized as a command in that line :/
you just have to remove 'get' and it will work
summon minecraft:armor_stand ~ ~0.5 ~ {NoBasePlate:1b,ShowArms:1b,ArmorItems:[{id:leather_boots,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:leather_leggings,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:leather_chestplate,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:player_head,Count:1b,tag:{SkullOwner:"Rocker09871",display:{Name:'{"text":"ror","color":"yellow"}'}}}],HandItems:[{id:potion,Count:1b,tag:{Enchantments:[{id:fortune,lvl:32767}],Potion:"water",display:{Name:'[{"text":"Vegan ","color":"green","bold":true,"italic":false},{"text":"Water","color":"blue","bold":true,"italic":false}]'}}},{id:potion,Count:1b,tag:{Enchantments:[{id:fortune,lvl:32767}],Potion:"water",display:{Name:'[{"text":"Vegan ","color":"green","bold":true,"italic":false},{"text":"Water","color":"blue","bold":true,"italic":false}]'}}}],Pose:{RightArm:[-30f,-20f,20f],LeftArm:[-70f,30f],Head:[30f,0f]}}
Unfortunately not, this doesn't work.
Quote from TotalRico_» Unfortunately not, this doesn't work.
what is the command you are using?
the command should look like this:
/execute as @a if data entity @s Inventory[{Slot:102b,tag:{display:{color:3949738}}}]
it works for me on 1.16
Hello,
I am building a custom pvp map where players are assigned to teams. Each team has its own colored chest piece give to the players via command block using the example following command:
replaceitem entity @p armor.chest leather_chestplate{display:{Name:"\"Blue Team\"",color:3949738},Enchantments:[{id:binding_curse,lvl:1},{id:vanishing_curse,lvl:1}]} 1
I have 6 teams and with 6 separate repeating command blocks I am testing for each cosponsoring leather armor.
My problem is, I can only seem to get a @p (nearest player) command to work, and I need a @a command
this was my @p:
execute if data entity @p Inventory[{Slot:102b,tag:{display:{color:3949738}}}]
have tired various methods to detect the armor, by name, by color, but cannot get it to work.
Please help and much love in advance
To detect multiple players using data, you need to execute the data command for each player, hence:
(Wont reply until like 10 hrs cus going to sleep now)
Thank you for this.
"get" isn't recognized as a command in that line :/
you just have to remove 'get' and it will work
summon minecraft:armor_stand ~ ~0.5 ~ {NoBasePlate:1b,ShowArms:1b,ArmorItems:[{id:leather_boots,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:leather_leggings,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:leather_chestplate,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:player_head,Count:1b,tag:{SkullOwner:"Rocker09871",display:{Name:'{"text":"ror","color":"yellow"}'}}}],HandItems:[{id:potion,Count:1b,tag:{Enchantments:[{id:fortune,lvl:32767}],Potion:"water",display:{Name:'[{"text":"Vegan ","color":"green","bold":true,"italic":false},{"text":"Water","color":"blue","bold":true,"italic":false}]'}}},{id:potion,Count:1b,tag:{Enchantments:[{id:fortune,lvl:32767}],Potion:"water",display:{Name:'[{"text":"Vegan ","color":"green","bold":true,"italic":false},{"text":"Water","color":"blue","bold":true,"italic":false}]'}}}],Pose:{RightArm:[-30f,-20f,20f],LeftArm:[-70f,30f],Head:[30f,0f]}}
Unfortunately not, this doesn't work.
what is the command you are using?
the command should look like this:
it works for me on 1.16
summon minecraft:armor_stand ~ ~0.5 ~ {NoBasePlate:1b,ShowArms:1b,ArmorItems:[{id:leather_boots,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:leather_leggings,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:leather_chestplate,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:player_head,Count:1b,tag:{SkullOwner:"Rocker09871",display:{Name:'{"text":"ror","color":"yellow"}'}}}],HandItems:[{id:potion,Count:1b,tag:{Enchantments:[{id:fortune,lvl:32767}],Potion:"water",display:{Name:'[{"text":"Vegan ","color":"green","bold":true,"italic":false},{"text":"Water","color":"blue","bold":true,"italic":false}]'}}},{id:potion,Count:1b,tag:{Enchantments:[{id:fortune,lvl:32767}],Potion:"water",display:{Name:'[{"text":"Vegan ","color":"green","bold":true,"italic":false},{"text":"Water","color":"blue","bold":true,"italic":false}]'}}}],Pose:{RightArm:[-30f,-20f,20f],LeftArm:[-70f,30f],Head:[30f,0f]}}