microsoft / pxt

Microsoft MakeCode (PXT - Programming eXperience Toolkit)
https://makecode.com
MIT License
2.1k stars 588 forks source link

Minecraft function works only in singleplayer (player.onTellCommand) #10288

Open amg-12 opened 1 day ago

amg-12 commented 1 day ago

Describe the bug The Minecraft function player.onTellCommand does not work in multiplayer. The event will only trigger for the hosting player.

Image

To Reproduce Steps to reproduce the behavior:

  1. Run this program in Minecraft:
    player.onTellCommand("ping", function () {
    player.say("pong")
    })
  2. Whisper "ping" to yourself. /w @s ping
  3. If you are the player hosting the game, the event will trigger and respond with "pong" in the chat.
  4. If you are not the hosting player, the event will not trigger and nothing will happen.

Expected behavior The onTellCommand event should work correctly for all players in a multiplayer game.

Additional context This bug has existed for a long time. Previously reported and reproduced here. Seeing this resolved would mean a lot to me personally.