PaperSpigot-Parent/CraftBukkit-Patches/0083-Add-Option-to-Silence-...

38 lines
1.5 KiB
Diff
Raw Normal View History

2015-04-09 05:41:04 +02:00
From fd8e11bd340ece46dcb8a5cdf1997935728d4ee8 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
2015-02-28 12:36:22 +01:00
index 54133a7..53fbc3e 100644
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
2014-11-28 02:17:45 +01:00
@@ -95,7 +95,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc
}
}
2014-11-28 02:17:45 +01:00
- 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
2014-11-28 02:17:45 +01:00
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 );
+ }
}
--
2014-11-28 02:17:45 +01:00
2.1.0