Interface CommandNode<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>

    • Method Detail

      • execute

        @Nullable
        @Nullable net.kyori.adventure.text.Component execute​(CommandContext<T> context)
        Execute this node. This will only be executed if there are no further nodes in the chain.
        Parameters:
        context - the context that this command was executed in
        Returns:
        a component to optionally
      • getName

        @NotNull
        @NotNull java.lang.String getName()
        Gets this node's name, which will be used as a literal if needed.
      • getDescription

        java.lang.String getDescription()
        Gets this node's description for use in help commands. This should be a simple, one-line sentence.
      • getPermission

        @Nullable
        default @Nullable java.lang.String getPermission()
        Gets the permission needed to execute this node or any children.
        Returns:
        the permission, or null if no permission is needed
      • getArguments

        @NotNull
        default @NotNull java.util.List<CommandArgument<?>> getArguments()
        Gets this command's arguments. By default, returns an empty list.
      • next

        @Nullable
        default @Nullable CommandNode<T> next​(CommandContext<T> context)
        Returns the node following this node.
        Returns:
        the next node in the chain, or if this is the end of the chain, null