I'm working on a minigame in 1.13 and are trying to make a command that executes at a players position and spawns an area effect cloud there. I have managed that but I also need that area effect cloud to be spawned with a tag or something (or a score etc.) that can link it to the player that was used to spawn it, if you get what I mean. I tried with one command that is supposed to give the area effect cloud the players name as a tag but it doesn't seem to work:

/execute as @a[team=Alive,scores={ReadyToPlant=3,Sneak=1..,PlantedPotato=0},nbt={SelectedItem:{id:"minecraft:stripped_birch_wood"}}] at @s run summon area_effect_cloud ~ ~ ~ {Duration:2147483647,CustomName:"{\"text\":\"SpawningPotato\"}",Tags:["{\"text\":\"@s\"}"]}

Does anyone more skilled know how to do this?

  • I'm not sure how easy this is, but you're probably going to want to give everyone a unique player ID score, and then set a score in the area effect cloud to that value. – MBraedley Mar 15 at 15:55

You could try to make a command chain where after the area effect cloud is spawned it summons a perminate, imobile, indistructable, invisible entity such as a armor stand next to or under or above the area effect cloud that has a tag which can then activate a command block with the sequence:

execute if entity @e[type=armor_stand,tag=...] run ...

Idk if this will work or helps at all but I hope it does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.