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!
2 Answers
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.
-
-
Look I know this is old but I want to know a program that can do that. If you know then THATS AWESOME!!! Thanks.– IceBotYTCommented Oct 12, 2017 at 22:20
-
There's a log file for every Minecraft session. You can read that with any text editor, console, batch script, whatever. Commented Apr 30, 2018 at 20:52
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.
/gamerule <randomWord> <number>
in chat, then in a command blockgamerule <randomWord>
to get the number, thenstats
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.gamerule <randomWord> <number>
. Is that also acceptable? Then I already have an answer ready (written months ago, just forgot to post).