Skip to content

Lamp v3.1.4

Compare
Choose a tag to compare
@Revxrsal Revxrsal released this 10 Mar 20:16
  • Scheduled removal of the ArgumentParser API
  • Scheduled removal of the ArgumentStack#copy methods
  • @Default functionality has been reduced to default parameters only, and is no longer applicable on methods. Use @DefaultFor instead
  • Added CommandActor#dispatch(...) methods
  • Code cleanups

Migrating

@Default has been replaced by @DefaultFor, which requires explicitly supplying the path to be the default action for. For example:

@Command("foo")
public class FooCommand {

    @Subcommand("help") // The main path is /foo help <page> 
    @DefaultFor("foo")  // <--- We can run /foo <page> and /foo help <page> and 
                        //      get the same result
    public void help(CommandActor actor, @Default("1") int page) {
        ...
    }
}