From db8db0b36bb186fda12f8089a2100cdc5688cc8c Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Tue, 24 Dec 2013 10:14:53 +1100
Subject: [PATCH] Fix tab completion for some Vanilla commands (reload,
 plugins, testfor, tell) Thanks @ams2990

---
 ...Fix-Tab-Completion-for-Some-Commands.patch | 85 +++++++++++++++++++
 1 file changed, 85 insertions(+)
 create mode 100644 Bukkit-Patches/0021-Fix-Tab-Completion-for-Some-Commands.patch

diff --git a/Bukkit-Patches/0021-Fix-Tab-Completion-for-Some-Commands.patch b/Bukkit-Patches/0021-Fix-Tab-Completion-for-Some-Commands.patch
new file mode 100644
index 0000000000..dc1d2011b1
--- /dev/null
+++ b/Bukkit-Patches/0021-Fix-Tab-Completion-for-Some-Commands.patch
@@ -0,0 +1,85 @@
+From 9bbc5d1b1da84518c2b6bc5fa2bca12a16429594 Mon Sep 17 00:00:00 2001
+From: md_5 <git@md-5.net>
+Date: Tue, 24 Dec 2013 10:14:25 +1100
+Subject: [PATCH] Fix Tab Completion for Some Commands
+
+
+diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
+index b888da1..e21d167 100644
+--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
++++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
+@@ -40,4 +40,12 @@ public class PluginsCommand extends BukkitCommand {
+ 
+         return "(" + plugins.length + "): " + pluginList.toString();
+     }
++
++    // Spigot Start
++    @Override
++    public java.util.List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException
++    {
++        return java.util.Collections.emptyList();
++    }
++    // Spigot End
+ }
+diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+index ffbcac1..16dfdbd 100644
+--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
++++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+@@ -26,4 +26,12 @@ public class ReloadCommand extends BukkitCommand {
+ 
+         return true;
+     }
++
++    // Spigot Start
++    @Override
++    public java.util.List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException
++    {
++        return java.util.Collections.emptyList();
++    }
++    // Spigot End
+ }
+diff --git a/src/main/java/org/bukkit/command/defaults/TellCommand.java b/src/main/java/org/bukkit/command/defaults/TellCommand.java
+index d0aa102..0c2c9a1 100644
+--- a/src/main/java/org/bukkit/command/defaults/TellCommand.java
++++ b/src/main/java/org/bukkit/command/defaults/TellCommand.java
+@@ -48,4 +48,16 @@ public class TellCommand extends VanillaCommand {
+     public boolean matches(String input) {
+         return input.equalsIgnoreCase("tell") || input.equalsIgnoreCase("w") || input.equalsIgnoreCase("msg");
+     }
++
++    // Spigot Start
++    @Override
++    public java.util.List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException
++    {
++        if ( args.length == 0 )
++        {
++            return super.tabComplete( sender, alias, args );
++        }
++        return java.util.Collections.emptyList();
++    }
++    // Spigot End
+ }
+diff --git a/src/main/java/org/bukkit/command/defaults/TestForCommand.java b/src/main/java/org/bukkit/command/defaults/TestForCommand.java
+index c9ac1ce..a687fef 100644
+--- a/src/main/java/org/bukkit/command/defaults/TestForCommand.java
++++ b/src/main/java/org/bukkit/command/defaults/TestForCommand.java
+@@ -23,4 +23,16 @@ public class TestForCommand extends VanillaCommand {
+         sender.sendMessage(ChatColor.RED + "/testfor is only usable by commandblocks with analog output.");
+         return true;
+     }
++
++    // Spigot Start
++    @Override
++    public java.util.List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException
++    {
++        if ( args.length == 0 )
++        {
++            return super.tabComplete( sender, alias, args );
++        }
++        return java.util.Collections.emptyList();
++    }
++    // Spigot End
+ }
+-- 
+1.8.3.2
+