spigot/CraftBukkit-Patches/0032-Allow-Disabling-of-Command-Logging.patch
Aikar 9d913c29c7 Overhaul Timings System
* Now Tracks Commands
* Resolved Performance issue with Bukkit HandlerList method. Now all timings simply uses the Spigot System
* Performance Improvement simply not using TimedRegisteredListener too
* Bug with SyncChunkLoad tracking resolved. Now properly tracks many aspects of sync chunk load.
* Reset/On/Off accuracy - should no longer have any issues turning it on/off during runtime, so this has been re-enabled.
* Paste command on RCON now works
* Now tracks everything related to plugins too, so you can easily see total plugin cost
* Now tracks Tasks better and where they came from
* Now tracks plugins event handlers to the Listener/Method name too.
* Merged some Bukkit Patches so all timings changes are in 1 patch.
* Moved back to a CLQ for CustomTimingsHandler for thread safety for when tasks are created Async but then executed sync.
2014-07-08 09:32:57 +10:00

37 lines
1.5 KiB
Diff

From 40b8d0eb98d9f844180b56b5c721b9d470c77cd6 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 4f6e8ff..ef5657e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -943,7 +943,7 @@ public class PlayerConnection implements PacketPlayInListener {
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
// CraftBukkit start - whole method
- this.c.info(this.player.getName() + " issued server command: " + s);
+ if ( org.spigotmc.SpigotConfig.logCommands ) 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 98fcb47..afd6b56 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -130,4 +130,10 @@ public class SpigotConfig
config.addDefault( path, def );
return config.getString( path, config.getString( path ) );
}
+
+ public static boolean logCommands;
+ private static void logCommands()
+ {
+ logCommands = getBoolean( "commands.log", true );
+ }
}
--
1.9.1