-
-
Notifications
You must be signed in to change notification settings - Fork 76
Access raw commands from executor #422
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release
Description
Currently, when adding an executor to a command, you cannot retrieve the raw command string.
For most argument combinations it is pretty easy to convert an
Objectinto aString(for example: turning aPlayerinto aStringusingPlayer#getName()or turning any primitve types into strings)However, this gets pretty difficult when using the
EntitySelectorArgumentwhich lets you input selectors (@a,@e, etc.) which can produce the exact same result.Thus it would be useful if the CommandAPI implemented a way to retrieve the raw command string in the executor.
Expected code
In order to implement this, the CommandAPI could add a new method to the
CommandArgumentsclass like this:Extra details
For anyone wanting to implement this, the
CommandArgumentsclass is filled with information in theCommandAPIHandler. In there, there is a method calledargsToCommandArgswhich populates that with content.