Skip to content

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 4 commits into from
Apr 24, 2024
Merged

Fix help topic generation #546

merged 4 commits into from
Apr 24, 2024

Conversation

DerEchtePilz
Copy link
Member

@DerEchtePilz DerEchtePilz commented Apr 22, 2024

The basic thing works, just a few more things need checking:

@DerEchtePilz DerEchtePilz force-pushed the dev/fix-help-topics branch 4 times, most recently from 0cc76af to 3502781 Compare April 24, 2024 07:01
@DerEchtePilz DerEchtePilz merged commit bb043bb into dev/dev Apr 24, 2024
@DerEchtePilz DerEchtePilz deleted the dev/fix-help-topics branch April 24, 2024 18:38
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Help generation doesn't work for the namespaced version of a command
2 participants