3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-17 13:30:06 +01:00
Paper/CraftBukkit-Patches/0028-Allow-Disabling-of-Command-Logging.patch

37 Zeilen
1.4 KiB
Diff

2014-11-28 02:17:45 +01:00
From b3bcb677bd5bc7c5f845659b9239db32b9e293a6 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
2014-11-28 02:17:45 +01:00
index 0e4f35d..19aaf8f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
2014-11-28 02:17:45 +01:00
@@ -1034,6 +1034,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
2014-11-28 02:17:45 +01:00
// 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
2014-11-28 02:17:45 +01:00
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 );
+ }
}
--
2014-11-28 02:17:45 +01:00
2.1.0