diff --git a/paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch b/paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch index cb284ec070..9333d94423 100644 --- a/paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch +++ b/paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch @@ -39,7 +39,7 @@ public Vec3 getPosition() { return this.worldPosition; -@@ -302,7 +318,7 @@ +@@ -302,13 +318,13 @@ while (iterator.hasNext()) { ServerPlayer entityplayer = (ServerPlayer) iterator.next(); @@ -48,6 +48,13 @@ entityplayer.sendSystemMessage(ichatmutablecomponent); } } + } + +- 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); + } + @@ -400,4 +416,10 @@ public boolean isSilent() { return this.silent; diff --git a/paper-server/src/main/java/org/spigotmc/SpigotConfig.java b/paper-server/src/main/java/org/spigotmc/SpigotConfig.java index dede9ef01b..c0e9517fed 100644 --- a/paper-server/src/main/java/org/spigotmc/SpigotConfig.java +++ b/paper-server/src/main/java/org/spigotmc/SpigotConfig.java @@ -294,4 +294,10 @@ public class SpigotConfig "/skill" } ) ); } + + public static boolean silentCommandBlocks; + private static void silentCommandBlocks() + { + SpigotConfig.silentCommandBlocks = SpigotConfig.getBoolean( "commands.silent-commandblock-console", false ); + } }