Replies: 1 comment 2 replies
-
This is a brigadier limitation. The current executor is not available when an argument type is being parsed. If you look at the brigadier Also, calling EDIT: It is not the goal of this addition to the Paper API to create a command framework, only the bare minimum required to make the brigadier library useable by plugins. If you want a more complete (and better IMO) command framework, you can look at other existing options (cloud, CommandAPI, acf, etc.) |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem?
Using the new Brigadier API, I would like to create a custom argument type that returns a direct player instead of a list with just one player in it. Unfortunately I'm unable to since PlayerSelectorArgumentResolver needs a CommandSourceStack to be resolved.
Describe the solution you'd like.
To extend the functionality of custom argument types it would come in handy to pass the current CommandSourceStack to the convert method of the interface. This could e.g. be used to return a different object depending on the command dispatcher, allow developers to create custom argument types that return an entity from a SelectorArgumentResolver that needs custom requirements, ...
Describe alternatives you've considered.
Create my own extension of ArgumentType
Other
No response
Beta Was this translation helpful? Give feedback.
All reactions