2014-07-27 21:14:24 +02:00
|
|
|
From b60ff81c08ad243e95bb23cf22bf03e73e630068 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Zach Brown <Zbob750@live.com>
|
|
|
|
Date: Sun, 27 Jul 2014 14:12:17 -0500
|
2014-07-21 22:46:54 +02:00
|
|
|
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 9596da2..3a24fcd 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
@@ -944,7 +944,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
|
2014-07-27 21:14:24 +02:00
|
|
|
index 6dfa8b0..6ea100e 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2014-07-27 21:14:24 +02:00
|
|
|
@@ -145,7 +145,13 @@ public class SpigotConfig
|
|
|
|
|
|
|
|
private static double getDouble(String path, double def)
|
|
|
|
{
|
|
|
|
- config.addDefault( path, def );
|
|
|
|
- return config.getDouble( path, config.getDouble( path ) );
|
|
|
|
+ config.addDefault(path, def);
|
|
|
|
+ return config.getDouble(path, config.getDouble(path));
|
|
|
|
+ }
|
2014-07-21 22:46:54 +02:00
|
|
|
+
|
|
|
|
+ public static boolean logCommands;
|
|
|
|
+ private static void logCommands()
|
|
|
|
+ {
|
|
|
|
+ logCommands = getBoolean( "commands.log", true );
|
2014-07-27 21:14:24 +02:00
|
|
|
}
|
2014-07-21 22:46:54 +02:00
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|