Skip to content

Allow users to specify different command executors #7

@willkroboth

Description

@willkroboth

Suggestion

The CommandAPI allows programmers to restrict who can run commands using methods like .executesPlayer() or .executesConsole(). ConfigCommands should support this feature in its commands. This would allow users to prevent commands from being executed in certain instances, or to specify different behavior for different <sender> types.

This behavior is technically already possible using goto <sender>.getType(), but this suggestion would make commands like this cleaner.

Example

commands:
  hub:
    name: hub
    permission: navigation.hub
    shortDescription: Go to hub
    fullDescription: Sends the user back to the hub
    playerCommands:
    - /mvtp hub

This /hub command would only be able to be run by a player.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting releaseIssue will be resolved by the next releaseBaseRelated to the ConfigCommand pluginenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions