2

I'm using vanilla version 1.10.2. I have added a MinecartChest to a team using this command: /scoreboard teams join orange @e[type=MinecartChest,r=3]. I can tell that it has been added to the team, because the name of the chest changes color to orange, plus it is listed when I run /scoreboard teams list orange.

I then try to run /say @e[team=orange] but the minecart's name isn't listed. In addition, trying to use the selector @e[type=MinecartChest,team=orange] in any other command fails as well. However, if I run \say @e[type=MinecartChest], the minecart chest is listed normally.

Is this an issue that has been encountered before, or is this behavior normal? Is there a way to get around this?

2 Answers 2

2

As Skylinerw said, the team selector parameter doesn't work on non-living entities (except Armor Stands). A way to work around this is to add a tag to the entity. For example, if you add something to the orange team, also add an orange tag to it:

/scoreboard players tag @e[type=MinecartChest,r=3] add orange

Then you can select it like normal, but using a tag parameter instead of a team parameter:

/say @e[tag=orange] Hello
2

The team parameter will throw out any targets that are not "living" (keeping only players, all mobs, and armor stands). While a non-living entity may be inserted into a team, you may not target them with a selector based on their team.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .