EngineHub / Piston

A generic command system, with tie-ins to many Minecraft platforms such as Bukkit, Forge, and Sponge.
GNU General Public License v3.0
17 stars 3 forks source link

`@ArgFlag` not bound if out of position #10

Closed wizjany closed 5 years ago

wizjany commented 5 years ago
@Command(...)
public void xyz(@Arg(...) String str, @ArgFlag(name = 'p', def = "1") int page) {
    // ...
}

//xyz -p 2 blah gives

java.lang.IllegalStateException: Argument never bound: 2
    at org.enginehub.piston.impl.CommandParser.bindArgument(CommandParser.java:207) ~[core-7.0.0-SNAPSHOT.jar:?]

//xyz blah -p 2 works