mojira.dev
MC-55943

"/execute as [X entities] run tell [recipient] [message]" makes [recipient] tell themselves [message] X times

When you run the command
/execute as @e[limit=3,sort=random] run tell @p Meow

3 random entities will meow at you, as expected… and you will also meow at yourself 3 times.

Attachments

Comments 18

Where do you see the bug ?

I saw it in the chat I'll post an Image...
As you can see on the Image,
The Pig whispers to me, and I whisper to myself.
On a Server with 2 or more Players every Player whispers to hisself.
the only command I used is in the chat.

You mean, a player cannot whisper to himself it issuing /tell @p Test in the chat ?

No...
I try to explain it again:
If you execute the /tell command with an entity (/execute @e[type=Pig] ~ ~ ~ /tell @p ...)
not only the entity whispers to you, you also whisper to yourself (e.g.:
"Pig whispers to you..."
and "You whisper to Zuzu_Typ ..."
what I mean is:
the specified player is the Pig (@e[type=Pig]) and NOT me.
so I shouldn't be whispering to myself.

My explanation:

if there is 1 pig in the world, and you do
/execute @e[type=Pig] ~ ~ ~ tell @p hi
the pig should whisper "hi" to you. it does that, but you also whisper to yourself, but that shouldn't happen because you only specified the pig with [type=Pig], and not yourself. Also strange: you seem to be sending a whisper to yourself, but you don't get the message that (your name) whispers to you: hi

8 more comments

Confirmed in 1.15.2 and 20w21a. Updated command:

/execute as @e[type=!player,limit=1] run tell @p Test

Can confirm in 20w48a.

Can confirm in 21w05b.

Confirmed for 23w04a.

An entity whispers to me and I whisper to myself despite specifying !player.

clamlol

(Unassigned)

Confirmed

Commands

Minecraft 14w21b, Minecraft 1.8.2-pre1, Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 15w31a, ..., 1.19.1 Pre-release 4, 23w04a, 23w41a, 25w31a, 1.21.7 Release Candidate 2

Retrieved