mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-08-05 16:48:51 +00:00
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
![]() |
From 24904f6165f20ce4094c3e1f1140d5d9bb623bd9 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 95d0bba8..11a44504 100644
|
||
|
--- a/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
||
|
+++ b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
||
|
@@ -197,7 +197,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 66cdcd8b..f11f5b45 100644
|
||
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||
|
@@ -292,4 +292,10 @@ public class SpigotConfig
|
||
|
"/skill"
|
||
|
} ) );
|
||
|
}
|
||
|
+
|
||
|
+ public static boolean silentCommandBlocks;
|
||
|
+ private static void silentCommandBlocks()
|
||
|
+ {
|
||
|
+ silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
|
||
|
+ }
|
||
|
}
|
||
|
--
|
||
|
2.17.1
|
||
|
|