Fire TabCompleteEvent for legacy commands (#10834)

This commit is contained in:
Jake Potrebic
2024-05-31 08:46:42 -07:00
parent 2cc4c182ae
commit 3a135ada91
2 changed files with 26 additions and 0 deletions

View File

@@ -1974,3 +1974,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete.");
return true;
diff --git a/src/main/java/org/bukkit/event/server/TabCompleteEvent.java b/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
+++ b/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
* themselves. Plugins wishing to remove commands from tab completion are
* advised to ensure the client does not have permission for the relevant
* commands, or use {@link PlayerCommandSendEvent}.
+ * @apiNote Only called for bukkit API commands {@link org.bukkit.command.Command} and
+ * {@link org.bukkit.command.CommandExecutor} and not for brigadier commands ({@link io.papermc.paper.command.brigadier.Commands}).
*/
public class TabCompleteEvent extends Event implements Cancellable {