From 576cd987435c33f723e14dd5dc953eb54a3b8f91 Mon Sep 17 00:00:00 2001 From: Reflxction Dev Date: Wed, 8 Jun 2022 22:50:23 +0300 Subject: [PATCH] register player parameter on older versions --- .../main/java/revxrsal/commands/bukkit/core/BukkitHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bukkit/src/main/java/revxrsal/commands/bukkit/core/BukkitHandler.java b/bukkit/src/main/java/revxrsal/commands/bukkit/core/BukkitHandler.java index 95ee8b10..264b97d4 100644 --- a/bukkit/src/main/java/revxrsal/commands/bukkit/core/BukkitHandler.java +++ b/bukkit/src/main/java/revxrsal/commands/bukkit/core/BukkitHandler.java @@ -114,6 +114,8 @@ public BukkitHandler(@NotNull Plugin plugin) { if (EntitySelectorResolver.INSTANCE.supportsComplexSelectors() && isBrigadierSupported()) getAutoCompleter().registerParameterSuggestions(EntityType.class, SuggestionProvider.EMPTY); registerValueResolverFactory(EntitySelectorResolver.INSTANCE); + if (!isBrigadierSupported()) + getAutoCompleter().registerParameterSuggestions(Player.class, playerSuggestionProvider); getAutoCompleter().registerSuggestion("players", playerSuggestionProvider); getAutoCompleter() .registerSuggestion("worlds", SuggestionProvider.map(Bukkit::getWorlds, World::getName))