2023-06-08 17:32:29 +10:00
|
|
|
From 45c34aadb55f2f25e75ecbb1328d254b35caa3d9 Mon Sep 17 00:00:00 2001
|
2018-07-15 10:00:00 +10:00
|
|
|
From: md_5 <git@md-5.net>
|
|
|
|
Date: Sun, 9 Feb 2014 14:39:01 +1100
|
|
|
|
Subject: [PATCH] Add Option to Silence CommandBlock Console
|
|
|
|
|
|
|
|
|
2021-03-16 09:00:00 +11:00
|
|
|
diff --git a/src/main/java/net/minecraft/commands/CommandListenerWrapper.java b/src/main/java/net/minecraft/commands/CommandListenerWrapper.java
|
2023-06-08 01:30:00 +10:00
|
|
|
index 4f4d25c43..8a07f629a 100644
|
2021-03-16 09:00:00 +11:00
|
|
|
--- a/src/main/java/net/minecraft/commands/CommandListenerWrapper.java
|
|
|
|
+++ b/src/main/java/net/minecraft/commands/CommandListenerWrapper.java
|
2023-06-08 01:30:00 +10:00
|
|
|
@@ -341,7 +341,7 @@ public class CommandListenerWrapper implements ICompletionProvider {
|
2018-07-15 10:00:00 +10:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-11 15:00:00 +10:00
|
|
|
- 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
|
2022-06-08 02:00:00 +10:00
|
|
|
this.server.sendSystemMessage(ichatmutablecomponent);
|
2018-07-15 10:00:00 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2023-04-10 08:30:55 +10:00
|
|
|
index 4f9b55c71..40c09ca21 100644
|
2018-07-15 10:00:00 +10:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2019-07-30 20:52:01 +10:00
|
|
|
@@ -294,4 +294,10 @@ public class SpigotConfig
|
2018-07-15 10:00:00 +10:00
|
|
|
"/skill"
|
|
|
|
} ) );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static boolean silentCommandBlocks;
|
|
|
|
+ private static void silentCommandBlocks()
|
|
|
|
+ {
|
|
|
|
+ silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2023-06-08 01:30:00 +10:00
|
|
|
2.40.1
|
2018-07-15 10:00:00 +10:00
|
|
|
|