mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 12:41:50 +01:00
SPIGOT-2369: Tab completing non existant command
This commit is contained in:
parent
5a55e13868
commit
5fc80916f5
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ public class ConsoleCommandCompleter implements Completer {
|
||||||
protected List<String> evaluate() {
|
protected List<String> evaluate() {
|
||||||
List<String> offers = server.getCommandMap().tabComplete(server.getConsoleSender(), buffer);
|
List<String> offers = server.getCommandMap().tabComplete(server.getConsoleSender(), buffer);
|
||||||
|
|
||||||
TabCompleteEvent tabEvent = new TabCompleteEvent(server.getConsoleSender(), buffer, offers);
|
TabCompleteEvent tabEvent = new TabCompleteEvent(server.getConsoleSender(), buffer, (offers == null) ? Collections.EMPTY_LIST : offers);
|
||||||
server.getPluginManager().callEvent(tabEvent);
|
server.getPluginManager().callEvent(tabEvent);
|
||||||
|
|
||||||
return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions();
|
return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions();
|
||||||
|
|
Loading…
Reference in a new issue