From 5faa76dd15bb0fca8dfa8b9377fe66fec2021e48 Mon Sep 17 00:00:00 2001 From: md_5 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/commands/CommandListenerWrapper.java b/src/main/java/net/minecraft/commands/CommandListenerWrapper.java index c857e8da37..81caaa1828 100644 --- a/src/main/java/net/minecraft/commands/CommandListenerWrapper.java +++ b/src/main/java/net/minecraft/commands/CommandListenerWrapper.java @@ -321,7 +321,7 @@ public class CommandListenerWrapper implements ICompletionProvider { } } - if (this.source != this.server && this.server.getGameRules().getBoolean(GameRules.RULE_LOGADMINCOMMANDS)) { + if (this.source != this.server && this.server.getGameRules().getBoolean(GameRules.RULE_LOGADMINCOMMANDS) && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot this.server.sendSystemMessage(ichatmutablecomponent); } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java index 4f9b55c713..40c09ca21b 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.34.1