mojira.dev
MC-262774

Entity selectors in /say commands are not evaluated in chat if "Only Show Secure Chat" is enabled

Including entity selectors as part of the message of a /say command should display the list of entities targeted by the selector.

However, this does not happen if "Only Show Secure Chat" is enabled in the chat settings.

This is unintuitive since it is not immediately obvious that this setting has this effect. If "Only Show Secure Chat" is disabled, there is no indication that such a chat message would be considered insecure.

Additionally, /say is frequently used for debugging purposes; to test which entities are affected by a specific entity selector without actually affecting anything.

How to reproduce

  1. Open or create a world with cheats enabled

  2. Make sure "Only Show Secure Chat" in chat settings is enabled

  3. Run /say @e in chat

Observed behaviour

The resulting message in chat is

[violine1101] @e

but the game log receives the message (when playing in singleplayer)

[Not Secure] [violine1101] Interaction, Marker, Marker, Marker, Item Frame, Item Frame, Item Frame, Item Frame, Item Frame, Item Frame, violine1101

Expected behaviour

Any of the following:

  • Entity selectors are resolved in the ingame chat even if "Only Show Secure Chat" is enabled.

  • If "Only Show Secure Chat" is disabled, messages with resolved entity selectors are marked as insecure.

  • If "Only Show Secure Chat" is enabled, messages with unresolved entity selectors have some indication that the selectors have not been resolved because "Only Show Secure Chat" is enabled.

Linked issues

Comments 4

Shuddery

I'm on 1.20 pre-4 and /say @e seems to list all entities correctly

user-f2760

Perhaps it's OP vs non-OP?

violine1101

I tested it both on a server and in single player. In both cases, I was OP.

Edit: Turns out the selector is evaluated but the results are only sent to the game log, not the ingame chat.

user-f2760

Can reproduce, but only when the setting "Only Show Secure Chat" is set to "On".

violine1101

(Unassigned)

Confirmed

Commands

1.19.4, 1.20 Pre-release 4

Retrieved