Skip to content
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

Command with unfulfilled requirement #470

Open
Timongcraft opened this issue Jul 21, 2023 · 0 comments · May be fixed by #602
Open

Command with unfulfilled requirement #470

Timongcraft opened this issue Jul 21, 2023 · 0 comments · May be fixed by #602
Assignees
Labels
bug Something isn't working

Comments

@Timongcraft
Copy link
Contributor

CommandAPI version

9.0.3

Minecraft version

1.19.3

Are you shading the CommandAPI?

Yes

What I did

  • I registered a command with a requirement that could not be fulfilled
  • I typed /help

What actually happened

The command appeared

What should have happened

The command should not appear

Server logs and CommandAPI config

No response

Other

1.20.1 (The menu only goes up to 1.19.3)
Paper

@Timongcraft Timongcraft added the bug Something isn't working label Jul 21, 2023
@Timongcraft Timongcraft changed the title Command with unfulfilled Command with unfulfilled requirement Jul 21, 2023
@DerEchtePilz DerEchtePilz self-assigned this Oct 6, 2023
willkroboth added a commit that referenced this issue 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 issue 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 issue 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 issue 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 issue 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 issue 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 issue 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 issue 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 issue 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 willkroboth linked a pull request Sep 3, 2024 that will close this issue
5 tasks
@willkroboth willkroboth linked a pull request Sep 3, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants