2019-02-02 11:14:44 +11:00
|
|
|
From 6140ee8e03aebf221d9ba5938645a5aa378a404d 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
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CommandListenerWrapper.java b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
2019-02-02 11:14:44 +11:00
|
|
|
index 2e5148e57..5aa3a93ce 100644
|
2018-07-15 10:00:00 +10:00
|
|
|
--- a/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
|
2019-02-02 11:14:44 +11:00
|
|
|
@@ -204,7 +204,7 @@ public class CommandListenerWrapper implements ICompletionProvider {
|
2018-07-15 10:00:00 +10:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-26 12:00:00 +10:00
|
|
|
- if (this.base != this.i && this.i.getGameRules().getBoolean("logAdminCommands")) {
|
|
|
|
+ if (this.base != this.i && this.i.getGameRules().getBoolean("logAdminCommands") && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
|
2018-07-15 10:00:00 +10:00
|
|
|
this.i.sendMessage(ichatbasecomponent1);
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2018-12-28 10:22:10 +11:00
|
|
|
index 20a83a6fc..161a02478 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
|
2018-12-28 10:22:10 +11:00
|
|
|
@@ -299,4 +299,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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2018-11-14 14:20:34 +11:00
|
|
|
2.19.1
|
2018-07-15 10:00:00 +10:00
|
|
|
|