2021-12-31 09:05:00 +11:00
|
|
|
From 5db7dd1151dae058b18452675e7235fa7b5c2e9f Mon Sep 17 00:00:00 2001
|
2014-04-12 14:18:37 +10:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Fri, 21 Jun 2013 18:01:29 +1000
|
|
|
|
Subject: [PATCH] Allow Disabling of Command Logging
|
|
|
|
|
|
|
|
|
2021-03-16 09:00:00 +11:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
2021-12-31 09:05:00 +11:00
|
|
|
index a6297a8cd..8f90e6d81 100644
|
2021-03-16 09:00:00 +11:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
2021-12-31 09:05:00 +11:00
|
|
|
@@ -1877,6 +1877,7 @@ public class PlayerConnection implements ServerPlayerConnection, PacketListenerP
|
2017-05-14 12:00:00 +10:00
|
|
|
private void handleCommand(String s) {
|
2014-05-15 17:05:45 +10:00
|
|
|
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
|
2018-07-15 10:00:00 +10:00
|
|
|
// CraftBukkit start - whole method
|
2014-11-26 08:27:08 +11:00
|
|
|
+ if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
2021-11-22 09:00:00 +11:00
|
|
|
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
2014-05-15 17:05:45 +10:00
|
|
|
|
2021-11-22 09:00:00 +11:00
|
|
|
CraftPlayer player = this.getCraftPlayer();
|
2014-04-12 14:18:37 +10:00
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2020-01-22 08:00:00 +11:00
|
|
|
index 2a585d004..1e393421c 100644
|
2014-04-12 14:18:37 +10:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2017-03-24 15:24:46 +11:00
|
|
|
@@ -150,4 +150,10 @@ public class SpigotConfig
|
2014-04-12 14:18:37 +10:00
|
|
|
config.addDefault( path, def );
|
2014-07-26 18:03:45 +01:00
|
|
|
return config.getDouble( path, config.getDouble( path ) );
|
2014-04-12 14:18:37 +10:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static boolean logCommands;
|
|
|
|
+ private static void logCommands()
|
|
|
|
+ {
|
|
|
|
+ logCommands = getBoolean( "commands.log", true );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2020-05-09 18:48:11 +10:00
|
|
|
2.25.1
|
2014-04-12 14:18:37 +10:00
|
|
|
|