19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From 5c461033875ead74b7ef1c83e6d6bc3e3938e347 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/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
index c6032b2..8bd58c9 100644
|
|
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
@@ -95,7 +95,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc
|
|
}
|
|
}
|
|
|
|
- if (icommandlistener != minecraftserver && minecraftserver.worldServer[0].getGameRules().getBoolean("logAdminCommands")) {
|
|
+ if (icommandlistener != minecraftserver && minecraftserver.worldServer[0].getGameRules().getBoolean("logAdminCommands") && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
|
|
minecraftserver.sendMessage(chatmessage);
|
|
}
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
index 8419c28..f58208e 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@@ -289,4 +289,10 @@ public class SpigotConfig
|
|
"/skill"
|
|
} ) );
|
|
}
|
|
+
|
|
+ public static boolean silentCommandBlocks;
|
|
+ private static void silentCommandBlocks()
|
|
+ {
|
|
+ silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
|
|
+ }
|
|
}
|
|
--
|
|
2.1.0
|
|
|