Skip to content

Add tab-complete coding suggestions when adding to .executes with /configcommands build #29

@willkroboth

Description

@willkroboth

This suggestion is inspired by this example for Brigadier Suggestions from the CommandAPI.

Basically, there would be a command, functionline or something that gives suggestions for each step of writing a line of code when using /configcommands build. Some examples:

Typed: /functionline
Suggesting: [command, set, do, tag, if, goto, return]

Typed: /functionline set
Suggesting: All available variable names, ex: [<sender>, <commandIndex>]

Typed: /functionline set <commandIndex>
Suggesting: All the ways to make an Integer? ex: [Integer.new(, Integer.(, <commandIndex>]

Typed: /functionline command
Suggesting: All commands available on the server, use CommandAPI's CommandArgument

Once the user presses enter and the build menu intercepts the command as a message, if it is a /functionline command it can get intercepted and parsed to the correct syntax.

Sent: /functionLine set <commandIndex> Integer.("4")
Parsed: <commandIndex> = Integer.("4")

Sent: /functionLine command /say Hello World!
Parsed: /say Hello World!

This is probably easier said than done, and it's not very easy to say!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions