PaperSpigot-Parent/CraftBukkit-Patches/0028-Allow-Disabling-of-Command-Logging.patch
md_5 cf6a7ce46d Use CLQ for main thread tasks.
Means netty threads aren't blocked for long synchronisations whilst tasks are running.
2015-04-21 17:27:35 -05:00

37 lines
1.5 KiB
Diff

From ab69bfc5ab7eaa0ef4fb1f568a2b0d88181d122d Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:01:29 +1000
Subject: [PATCH] Allow Disabling of Command Logging
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index eb977e1..8e18c9f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1069,6 +1069,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
private void handleCommand(String s) {
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
// CraftBukkit start - whole method
+ if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.c.info(this.player.getName() + " issued server command: " + s);
CraftPlayer player = this.getPlayer();
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index fdd4fe1..4e7d731 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -148,4 +148,10 @@ public class SpigotConfig
config.addDefault( path, def );
return config.getDouble( path, config.getDouble( path ) );
}
+
+ public static boolean logCommands;
+ private static void logCommands()
+ {
+ logCommands = getBoolean( "commands.log", true );
+ }
}
--
2.1.0