mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-09-18 21:33:01 +00:00
37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
From 88faa83240e62f9a6e79127a324e00f6e0bae64f 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/commands/CommandListenerWrapper.java b/src/main/java/net/minecraft/commands/CommandListenerWrapper.java
|
|
index c0d0087a32..d7973559db 100644
|
|
--- a/src/main/java/net/minecraft/commands/CommandListenerWrapper.java
|
|
+++ b/src/main/java/net/minecraft/commands/CommandListenerWrapper.java
|
|
@@ -327,7 +327,7 @@ public class CommandListenerWrapper implements ExecutionCommandSource<CommandLis
|
|
}
|
|
}
|
|
|
|
- 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 c612c321d9..5d2c3a6b88 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.43.0
|
|
|