Paper/CraftBukkit-Patches/0104-Add-Option-to-Silence-CommandBlock-Console.patch
Ginger Geek fe031329f3 Allows greater control over Tab Command Complete.
You can now specify how many letters of the command must be typed before it will be tab completed this will help deter people from just spamming round all the commands to see if there is one incorrectly set up.
0 will tab complete all commands
-1 will disable tab complete

1 will mean you have to type the first letter
2 will mean you have to the second letter... etc...
2014-04-02 18:01:40 +11:00

38 lines
1.4 KiB
Diff

From c4865a8d3af6d5e5a9704f7dfa4cba7811c54d43 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 4c21643..4e4f001 100644
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
@@ -83,7 +83,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc
}
}
- if (icommandlistener != MinecraftServer.getServer()) {
+ if (icommandlistener != MinecraftServer.getServer() && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
MinecraftServer.getServer().sendMessage(chatmessage);
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 5d65983..d749f16 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -272,4 +272,10 @@ public class SpigotConfig
"/skill"
} ) );
}
+
+ public static boolean silentCommandBlocks;
+ private static void silentCommandBlocks()
+ {
+ silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
+ }
}
--
1.8.3.2