This question already has an answer here:

How do I use the /testfor command in a command block to test for a specific word that a Minecraft player playing on the server says. For my example, if a player says:

[Player] - Hi

The command block then says:

[Command Block] - Hello.

Please help, just trying to create a cool command =) {If This Works Please Tell Me}

marked as duplicate by aytimothy, user106385, Dragonrage, Unionhawk, galacticninja Jun 2 '16 at 5:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You just can't.

As per current, command blocks cannot read from the chat line.

Read this answer for more information.

Not the answer you're looking for? Browse other questions tagged or ask your own question.