Mojira Archive
MC-161067

Changing another player's gamemode using `/execute as` shows shows wrong message in chat for both players

Changing another player's gamemode using /execute as will result in the command execution chat messages to show incorrectly for both the command executor, and the player who's gamemode was changed.

Steps to Reproduce:

  1. Have two players join a server, or LAN world
  2. Player 1 exectutes the following command:
    /execute as [PLAYER 2 NAME] run gamemode [GAMEMODE]
    

Observed Behavior:

Player 1 will see the following chat message, which states their 'own' gamemode was changed:

Player 2 will see a chat message of the gamemode changing, as if it was another player:
(example)

Expected Behavior:

The messages shown to each player would be inverted, and properly describe what happened to the player whose gamemode was changed.

Screenshots/Videos:

GamemodeChangeMultiplayer.mp4

Unresolved

[Mod] Jiingy

Nico Beginski

2019-09-14, 11:14 AM

2024-07-29, 11:44 PM

3

4

Confirmed

Commands

chat, command, gamemode

1.14.4 - 1.20.51.14.4, 19w37a, 1.16.4, 1.20.4, 1.20.5 Pre-Release 1, 1.20.5

-