Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 03:20:07 +01:00
e02c239421
As requested here: http://www.spigotmc.org/threads/specify-location-of-spigot-yml.67747/
37 Zeilen
1.5 KiB
Diff
37 Zeilen
1.5 KiB
Diff
From 56bf7e9fe6eebb3fc7eab2b589ca2bee149f8d26 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
|
|
index 794464a..40fa8b7 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -1065,6 +1065,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
|
private void handleCommand(String s) {
|
|
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
|
|
// 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
|
|
index dcca493..3999f5b 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@@ -149,4 +149,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 );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.0.msysgit.0
|
|
|