suggestion: add a subcommand to /player that can make fake players send messages in chat/execute commands
meadowsys opened this issue ยท 6 comments
there is no real practical use for it, just that it would be interesting to see implemented. this makes the fake players more like real players.
suggested use: /player Steve chat Hello World
, which prints "Hello World" to the chat as if the player were real and typed it themself.
maybe if they have op permissions or cheats: /player Steve chat /gamemode survival
or something like that, this executes /gamemode survival
/execute as Steve at @s run gamemode survival
works
I'm not completely set on "chat", maybe "say" and "execute" for chat and commands, respectively
The /say command has square brackets around the name of the entity executing it:
[Alex] Message
An actual player chat message has the triangular ones:
<Alex> Message
Clicking on the name of the player in a message also auto fills a /msg command. You could replicate this with tellraw, as it has a command suggestion feature, and can display almost any text.
the /execute
one works for commands, but i think having something inside /player
for chat that displays the triangular brackets would be more intuitive I think
Maybe a command like /tellraw @a [{"text":"<"},{"selector":"####","clickEvent":{"action":"suggest_command","value":"/tell #### "}},{"text":"> Message"}]
(replace ####
with the player's name) would produce the results you want? But that would be complicated as you would need to write a separate such command for each player, while /player #### chat Message
would be more simpler and less work on the user end.
How is this necessary. Just do
/execute as Alex run say This is how we do it
-> (in the chat) [Alex] This is how we do it