Access raw commands from executor #422
Labels
enhancement
New feature or request
implemented for next release
This 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
Object
into aString
(for example: turning aPlayer
into aString
usingPlayer#getName()
or turning any primitve types into strings)However, this gets pretty difficult when using the
EntitySelectorArgument
which 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
CommandArguments
class like this:Extra details
For anyone wanting to implement this, the
CommandArguments
class is filled with information in theCommandAPIHandler
. In there, there is a method calledargsToCommandArgs
which populates that with content.The text was updated successfully, but these errors were encountered: