-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Reordered constructor arguments to more closely match the order in `ExecutableCommand` - This branch is now definitely backward incompatible (though not majorly) - Replaced `List<String> argsAsStr` with `Node rootNode` - Added `RegisteredCommand.Node` class - Has an `argsAsStr` method as a replacement for the parameter of `RegisteredCommand` - Simplified representation of the Brigadier's `CommandNode` structure for the command - Removed `AbstractArgument#getHelpString` and `RegisteredCommand#arguments` (Added by #537) - The `RegisteredCommand.Node` structure is used to generate usage - `Literal` and `MultiLiteral` have separate logic for creating thier `RegisteredCommand.Node, wherein they define a different help string - TODO: #537 didn't have any tests, so I'm only guessing this new implementation works the same. In general, add more tests for usage generation. - Removed `ExecutableCommand#getArgumentsAsStrings` and `AbstractArgument#appendToCommandPaths` - Added `AbstractArgument.NodeInformation` to help pass around enough information to generate Brigadier nodes and `RegisteredCommand.Node`s in one `AbstractArgument` tree traversal. - Modified the signatures of a few methods to facilitate this, including overriding methods - TODO: This broke `Previewable` arguments, so I'll have to tweak those - Changed `CommandAPIHandler#registeredCommands` from an `ArrayList` to a `LinkedHashMap` - Instead of creating one `RegisteredCommand` object for each command path, `RegisteredCommand`s are merged when they share thier command name and namespace - One call to `ExecutableCommand#register` creates one `RegisteredCommand` object (if it has a namespace, an unnamespaced copy is created too) - `CommandAPIPlatform#postCommandRegistration` was reverted to original signature - NOTE: `CommandAPI#getRegisteredCommands` still returns a `List<RegisteredCommand>` - Updated `CommandAPICommandRegisteredCommandTests` and `CommandTreeRegisteredCommandTests` - Added `RegisteredCommandTestBase` to handle common utility methods
- Loading branch information
1 parent
e958eeb
commit e2fd0a0
Showing
26 changed files
with
1,208 additions
and
688 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.