mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-08-05 16:48:51 +00:00
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
From 70a496c07905877413da2a7e17add4208c77e885 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Sun, 9 Feb 2014 14:39:01 +1100
|
|
Subject: [PATCH] Add Option to Silence CommandBlock Console
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CommandListenerWrapper.java b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
|
index f80f55d17..5eabaca3c 100644
|
|
--- a/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
|
+++ b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
|
@@ -198,7 +198,7 @@ public class CommandListenerWrapper implements ICompletionProvider {
|
|
}
|
|
}
|
|
|
|
- if (this.base != this.i && this.i.aQ().getBoolean("logAdminCommands")) {
|
|
+ if (this.base != this.i && this.i.aQ().getBoolean("logAdminCommands") && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
|
|
this.i.sendMessage(ichatbasecomponent1);
|
|
}
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
index efd391967..bf2aa1fa1 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@@ -294,4 +294,10 @@ public class SpigotConfig
|
|
"/skill"
|
|
} ) );
|
|
}
|
|
+
|
|
+ public static boolean silentCommandBlocks;
|
|
+ private static void silentCommandBlocks()
|
|
+ {
|
|
+ silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
|
|
+ }
|
|
}
|
|
--
|
|
2.17.1
|
|
|