mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2024-11-21 20:56:14 +00:00
37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
From 54767cff6d829f78ad2bc892b806cba0f8bd9bad Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
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/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
index adb9307b09..4f72da4f06 100644
|
|
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
@@ -2093,6 +2093,7 @@ public class PlayerConnection extends ServerCommonPacketListenerImpl implements
|
|
|
|
private void handleCommand(String s) {
|
|
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
|
|
+ if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
|
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
|
|
|
CraftPlayer player = this.getCraftPlayer();
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
index 7f14cbc63b..bc9fbcc584 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@@ -150,4 +150,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.47.0
|
|
|