Skip to content

Base command #1

@kethomassen

Description

@kethomassen

Base command support

Add a @Base annotation for the base command. For example,

@Base(description="Build a house", minArgs=0)
public void base(CallInfo call)
{
    // build house here
}

@Sub(description="Fix a House", minArgs=1, usage="<player>")
public void fix(CallInfo call) 
{
    // fix house here
}

Running /house help would produce a help message the following (With coloring and stuff, of course):

/house "Build a house"
/house fix <player> "Fixed a player houses
  • Running /house would run the base method
  • Running /house fix would run the fix method
  • If someone ran an unknown command, say /house steal john, an unknown command subcommand message would come up and the same message from /house help would appear

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions