2

You might be a bit concerned about this question, well, I'll explain it! I want a command block to be searching for anyone saying .clearchat and if it comes out true it will clear chat. Is it really possible(?), and if it is leave an answer below!

  • 1
    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank Jul 23 '17 at 14:52
  • Actually, you can use /gamerule <randomWord> <number> in chat, then in a command block gamerule <randomWord> to get the number, then stats to do something based off of that value. But that doesn't help you for your case, because you still have the problem that no command can clear the chat of a player. The player has to press F3+D himself. – Fabian Röling Apr 30 '18 at 20:56
  • Well, you could spam the player's chat with empty lines. But again, only with gamerule <randomWord> <number>. Is that also acceptable? Then I already have an answer ready (written months ago, just forgot to post). – Fabian Röling Apr 30 '18 at 21:03
0

Programmes can in theory read the logs of the game to know what has been typed in the chat. However, command blocks cannot. As far as I know, commands can not clear the chat of a player either.

| improve this answer | |
  • Well, that shucks, well I got the clearchat covered. – IceBotYT Jul 26 '17 at 22:02
  • Look I know this is old but I want to know a program that can do that. If you know then THATS AWESOME!!! Thanks. – IceBotYT Oct 12 '17 at 22:20
  • There's a log file for every Minecraft session. You can read that with any text editor, console, batch script, whatever. – Fabian Röling Apr 30 '18 at 20:52
0

It is not possible for a command block to clear chat however, Building on @aeldrion’s answer, you can clear the chat for yourself by pressing F3 + D. Depending on your keyboard preferences on providing function keys, you may also have to press FN as well for it to work. I’m sorry your objective was not possible and I hope this trick will help you to work around it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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