mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-04-13 09:32:09 +00:00
36 lines
1.5 KiB
Diff
36 lines
1.5 KiB
Diff
From 69234b41325631969ae4ddb050523e79249749f8 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/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
index c43cad1579..403ce225d7 100644
|
|
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
@@ -1967,6 +1967,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.42.0
|
|
|