Allow Disabling of Command TabComplete

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2013-06-21 18:05:54 +10:00
parent 0eed728812
commit cabf908e4c
3 changed files with 49 additions and 17 deletions

View File

@ -2182,6 +2182,13 @@ public final class CraftServer implements Server {
}
public List<String> tabCompleteCommand(Player player, String message, ServerLevel world, Vec3 pos) {
// Spigot Start
if ( (org.spigotmc.SpigotConfig.tabComplete < 0 || message.length() <= org.spigotmc.SpigotConfig.tabComplete) && !message.contains( " " ) )
{
return ImmutableList.of();
}
// Spigot End
List<String> completions = null;
try {
if (message.startsWith("/")) {