Skip to content

v1.3 Release: Command Data, Bugfixes

Latest
Compare
Choose a tag to compare
@Cyral Cyral released this 30 Jul 21:57
· 5 commits to master since this release

This release adds data that can be sent to the commands by the calling code. You can think of this as arguments provided by your code instead of the user.

For example, parsing a command with:

Parser.Parse(input, "Hello World!")

The command that is executed has access to the command data through the second parameter provided (object data)

 Command.SetAction((arguments, data) => //Data is "Hello World"

Note that this is a breaking change for all commands. Users will simply have to modify their method/lambda signature. In the Java version, the command action is now a BiConsumer.

A number of small bugs have also been fixed.