The ListArgumentBuilder should be able to accept a list that uses Suggestion Info, not just a CommandSender #431
Labels
enhancement
New feature or request
implemented for next release
This has been implemented in the current dev build for the next public release
Milestone
Description
We can currently create dynamic lists for the
ListArgument
using the supplier method:as well as using this function method that accepts a
CommandSender
:However, these two methods don't let you specify lists based on the current input. Since the list declarations are used directly by suggestions, there's no reason why the CommandAPI should be hiding this functionality away.
Expected code
In
ListArgumentCommon
, we'd have to change the supplier to useSuggestionInfo
, and ensure this is applied:Extra details
For 9.0.0, I think it's safe to hard-replace
withList(Function<CommandSender, ...>)
withwithList(Function<SuggestionInfo, ...>)
. We'll include it in the upgrading guide with the relevant instructions for upgrading.The text was updated successfully, but these errors were encountered: