17

Hi, I have a single player world which is opened to LAN to let my friends play while I am AFK. I have a lot of command blocks running in that world and those commands are all logged in the log files.

So, my question is, how to only log player commands and chat?

Correct me if I am wrong, thank you.

20

There are 2 /gamerules that govern Command Block Output to the chat. The one you are looking for is

/gamerule logAdminCommands false

The the wiki entry on command blocks for more information.

Output Message

The output message describes the success or failure of the executed command, and may be written to multiple destinations: [...]

Chat: The output message is written to the chat text in singleplayer mode, or broadcast to all other ops in multiplayer mode, unless it has been suppressed with

/gamerule commandBlockOutput false.

Some commands may write additional text to the chat as their normal function which won't be suppressed (for example, the /say command will write a message to the chat of all players), separate from the output message. [...]

Logs: The output message is written to multiplayer server logs unless it has been suppressed with

/gamerule logAdminCommands false.

  • Is there a way to do this on an actual server (vanilla)? – RetroCraft Jun 19 '14 at 18:58
  • @RetroCraft, a little late but this is vanilla. – Octavia Togami Jun 28 '15 at 6:52
  • i know it's been a while, but this is the closest thing i've seen to what i'm looking for: can you also supress the chat output of messages like /give and /tp. sometimes a user has a legitimate gripe over a loss or whatever and i don't need the rest of the server piling on having seen me restoring an item or moving another to a safe place. – WhiteRau Jul 7 '16 at 0:55
  • @WhiteRau I believe only OPs can even see these messages, but I'm not sure. I also remember seeing this posted as a question recently, but I can't find it at the moment. I suggest you search the site yourself, and if you don't find anything, please ask it as a new question, so that everyone can benefit from it in the future. – MrLemon Jul 7 '16 at 13:37
1

So the problem is the capitalization of the line.

It is not like this:

/gamerule commandBlockoutput false

It is like this:

/gamerule commandBlockOutput false

It should work.

  • This was downvoted but it was exactly what I was looking for. Any reason why it shouldn't be upvoted? – flyingace Aug 6 '17 at 22:42

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.