Skip to content

Commit

Permalink
register player parameter on older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Revxrsal committed Jun 8, 2022
1 parent 9fbb2b9 commit 576cd98
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 576cd98

Please sign in to comment.