mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
e7f3ca4505
Allows us much greater control over the Spigot portion of the code and makes us more "proper" Credit to @Dmck2b for originally passing the idea along a while back
83 lines
No EOL
3.4 KiB
Diff
83 lines
No EOL
3.4 KiB
Diff
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/TellCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/TellCommand.java
|
|
@@ -0,0 +0,0 @@ public class TellCommand extends VanillaCommand {
|
|
|
|
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
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/TestForCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/TestForCommand.java
|
|
@@ -0,0 +0,0 @@ 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
|
|
}
|
|
--
|