aboutsummaryrefslogtreecommitdiffhomepage
path: root/CraftBukkit-Patches/0096-Add-Option-to-Silence-CommandBlock-Console.patch
diff options
context:
space:
mode:
Diffstat (limited to 'CraftBukkit-Patches/0096-Add-Option-to-Silence-CommandBlock-Console.patch')
-rw-r--r--CraftBukkit-Patches/0096-Add-Option-to-Silence-CommandBlock-Console.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/CraftBukkit-Patches/0096-Add-Option-to-Silence-CommandBlock-Console.patch b/CraftBukkit-Patches/0096-Add-Option-to-Silence-CommandBlock-Console.patch
new file mode 100644
index 0000000000..0e8efb3045
--- /dev/null
+++ b/CraftBukkit-Patches/0096-Add-Option-to-Silence-CommandBlock-Console.patch
@@ -0,0 +1,37 @@
+From 9415a077fbdf2ee6e336765b307c57156cc3610a Mon Sep 17 00:00:00 2001
+From: md_5 <[email protected]>
+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/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
+index 0644276..84bcca1 100644
+--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
++++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
+@@ -83,7 +83,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc
+ }
+ }
+
+- if (icommandlistener != MinecraftServer.getServer()) {
++ if (icommandlistener != MinecraftServer.getServer() && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
+ MinecraftServer.getServer().sendMessage(chatmessage);
+ }
+
+diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
+index 44eea2e..6b5ee89 100644
+--- a/src/main/java/org/spigotmc/SpigotConfig.java
++++ b/src/main/java/org/spigotmc/SpigotConfig.java
+@@ -283,4 +283,10 @@ public class SpigotConfig
+ "/skill"
+ } ) );
+ }
++
++ public static boolean silentCommandBlocks;
++ private static void silentCommandBlocks()
++ {
++ silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
++ }
+ }
+--
+1.9.1
+