-
-
Notifications
You must be signed in to change notification settings - Fork 74
Fix help topic generation #546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or 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
0cc76af
to
3502781
Compare
JorelAli
reviewed
Apr 24, 2024
...ndapi-bukkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/CommandAPIBukkit.java
Outdated
Show resolved
Hide resolved
JorelAli
approved these changes
Apr 24, 2024
This should be reverted if we think we should
c8b0d51
to
38f3a38
Compare
willkroboth
added a commit
that referenced
this pull request
May 13, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
May 14, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
May 17, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Jun 3, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Jun 8, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Jun 17, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Jul 4, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Aug 15, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Sep 1, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Oct 26, 2024
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Feb 2, 2025
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Feb 2, 2025
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Feb 15, 2025
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
willkroboth
added a commit
that referenced
this pull request
Mar 7, 2025
Revises github.com/JorelAli/CommandAPI/commit/ac8c06086f2e05015416b939028e1301ff95a87b Notable changes: - `RegisteredCommand` and `RegisteredCommand.Node` now have generic `<CommandSender>` parameter - `RegisteredCommand.Node` includes the `CommandPermission permission` and `Predicate<CommandSender> requirements`, copied from the argument/command the node represents - `RegisteredCommand#permission` is now acessibile as the permission of the `Node rootNode` - Created `CommandAPIHelpTopic` in `dev.jorel.commandapi.help` package - Replaced `shortDescription`, `fullDescription`, `usageDescription`, and `Object helpTopic` fields in `ExecutableCommand` and `RegisteredCommand` with `CommandAPIHelpTopic helpTopic` - Extended by `EditableHelpTopic` - Help builder methods of `ExecutableCommand` are delegated to its `CommandAPIHelpTopic` if it is editable - More general API created for #528: short description, full description, and usage can be provided separately to take advantage of the formatting the CommandAPI uses for static Strings - Extended by `BukkitHelpTopicWrapper` in `commandapi-bukkit-core` - Wraps Bukkit's `HelpTopic` as a `CommandAPIHelpTopic` so full `HelpTopic` customization can still be used - Created `CustomCommandAPIHelpTopic` in `commandapi-bukkit` - Converts a `CommandAPIHelpTopic` into a Bukkit `HelpTopic` for adding to the help map - Replaces usage of `NMS#generateHelpTopic` - Help formatting code extracted from `CommandAPIBukkit#updateHelpForCommands` - Resolves #470: `CommandSender` permissions and requirements are now checked when generating usage - Changed the treatement of namespaced help topics (#546). Namespaced help topics are now created. In the case where the same command name is registered with different namespaces, this allows the user to see the unmerged help using `/help namespace:commandName` (see `CommandHelpTests#testRegisterMergeNamespaces`). - Updated tests to fully cover changes TODO: Update and write documentation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basic thing works, just a few more things need checking:
Figure out if this has been introduced by Add support for custom namespaces for commands #509 or if this was a thing before. I did not check this when opening Help generation doesn't work for the namespaced version of a command #538Technically, namespaces having a help entry might actually be considered a bug since a command with theminecraft:
namespace didn't have a help entry before the current snapshot phase.Alias generation currently is stupid for namespaced versions of a commandNope, it isn't. See above.Should the usage generation be updated again to display the namespaced version of a command?Not necessary, the namespaced version having a help topic is a bug introduced by Add support for custom namespaces for commands #509