-
-
Notifications
You must be signed in to change notification settings - Fork 76
Description
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 a String (for example: turning a Player into a String using Player#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:
public String getFullInput() {
// Return whatever the user entered as a command
}Extra details
For anyone wanting to implement this, the CommandArguments class is filled with information in the CommandAPIHandler. In there, there is a method called argsToCommandArgs which populates that with content.