2015-02-26 11:40:16 +01:00
|
|
|
From a8e072d75fe03cc8a2223dc168209af41aa9a458 Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02:00
|
|
|
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
|
2015-01-25 00:37:00 +01:00
|
|
|
index eb018f1..c70d512 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
|
|
|
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
2015-01-25 00:37:00 +01:00
|
|
|
@@ -27,4 +27,12 @@ public class ReloadCommand extends BukkitCommand {
|
2014-07-21 22:46:54 +02:00
|
|
|
|
|
|
|
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
|
2014-12-10 02:58:37 +01:00
|
|
|
index 7b0a41c..2e5d811 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/command/defaults/TellCommand.java
|
|
|
|
+++ b/src/main/java/org/bukkit/command/defaults/TellCommand.java
|
2014-12-10 02:58:37 +01:00
|
|
|
@@ -46,4 +46,16 @@ public class TellCommand extends VanillaCommand {
|
2014-07-21 22:46:54 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/command/defaults/TestForCommand.java b/src/main/java/org/bukkit/command/defaults/TestForCommand.java
|
2014-12-10 02:58:37 +01:00
|
|
|
index 7e5494d..e168b49 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/command/defaults/TestForCommand.java
|
|
|
|
+++ b/src/main/java/org/bukkit/command/defaults/TestForCommand.java
|
2014-12-10 02:58:37 +01:00
|
|
|
@@ -24,4 +24,16 @@ public class TestForCommand extends VanillaCommand {
|
2014-07-21 22:46:54 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|