From 7f32fecc86aad9ac9a9a06ee563d64092bb9af57 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 10 Nov 2017 10:48:31 +1100 Subject: [PATCH] Fix tab completion for plugins / reload command By: md_5 --- .../java/org/bukkit/command/defaults/PluginsCommand.java | 7 +++++++ .../java/org/bukkit/command/defaults/ReloadCommand.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/PluginsCommand.java index b888da13ad..e40b03a72e 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/PluginsCommand.java @@ -1,6 +1,8 @@ package org.bukkit.command.defaults; import java.util.Arrays; +import java.util.Collections; +import java.util.List; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -24,6 +26,11 @@ public class PluginsCommand extends BukkitCommand { return true; } + @Override + public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { + return Collections.emptyList(); + } + private String getPluginList() { StringBuilder pluginList = new StringBuilder(); Plugin[] plugins = Bukkit.getPluginManager().getPlugins(); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/ReloadCommand.java index eb018f1614..0ab7e295d1 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/ReloadCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/ReloadCommand.java @@ -1,6 +1,8 @@ package org.bukkit.command.defaults; import java.util.Arrays; +import java.util.Collections; +import java.util.List; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -27,4 +29,9 @@ public class ReloadCommand extends BukkitCommand { return true; } + + @Override + public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { + return Collections.emptyList(); + } }