Is it possible to make a command block respond to something being said in the chat? Or even better - make it respond to a message - /msg or /tell. I want to say something in the chat and then a comparator next to the block emits a redstone signal. Is this possible?
Asked
Active
Viewed 3,777 times
-2
-
Or possible duplicate of Is there a way to have a Command Block ask for Player Input? – IronAnvil Apr 09 '18 at 21:42
-
https://gaming.stackexchange.com/questions/165471/can-i-use-the-testfor-command-to-check-for-certain-words-in-chat would be a much better dupe target – pppery Sep 13 '18 at 03:00
1 Answers
3
No.
Command blocks can't respond to arbitrary text.
For OP players you can add a custom gamerule that they can set, but that's not completely arbitrary text, only works with OP permissions and will get removed in 1.13.
You can use tellraw with a clickable text, that's probably the best option for you, even though it's not what you asked for. Search for tellraw in the Minecraft wiki, there you can see the syntax and there's a link to the JSON format.
Fabian Röling
- 20,534
- 6
- 38
- 75
-
He can use /say too inside command block. But, will appear strange text. I recommend too using tellraw – IAsyncResult Apr 10 '18 at 23:22
-
@Nathan
/sayhas no JSON formatting, so you can't make clickable text with it. – Fabian Röling Apr 11 '18 at 06:11 -
Yes. I recomment too using Chat Component API in Spigot (plugins) instead of traditional vanilla :V – IAsyncResult Apr 12 '18 at 11:53