Skip to content

Conversation

@imeesa
Copy link

@imeesa imeesa commented Oct 22, 2025

Information

Closes #6336.

Details

This adds a config option that allows disabling the logging of console and RCON commands.

Environments tested:

OS: Arch Linux

Java version: openjdk 21.0.8 2025-07-15

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

Without these changes, with the config option not set:
image

With these changes, with the config option set to false:
image

Comment on lines -750 to +752
LOGGER.log(Level.INFO, cSender.getName()+ " issued server command: /" + commandLabel + " " + EssentialsCommand.getFinalArg(args, 0));
if (getSettings().logConsoleRconCommands()) {
LOGGER.log(Level.INFO, cSender.getName()+ " issued server command: /" + commandLabel + " " + EssentialsCommand.getFinalArg(args, 0));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should be checking if cSender is an instance of RemoteConsoleCommandSender instead? won't this catch console messages too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's intended behavior, i meant for this to catch both console and RCON commands. i can change this to use separate config options if you'd like

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm okay, i think we should rename the config option to log-console-command over specifically rcon then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config option for logging console/RCON commands

2 participants