🎨 Change (improve) command context semantics

This commit is contained in:
Alexander Söderberg 2020-10-01 13:24:15 +02:00
parent ee59066733
commit 9d47a7c82d
No known key found for this signature in database
GPG key ID: C0207FF7EA146678
8 changed files with 33 additions and 30 deletions

View file

@ -95,7 +95,7 @@ public class JLineCommandManager extends CommandManager<JLineCommandSender> impl
return ArgumentParseResult.success(
stringBuilder.toString());
})).build())
.handler(commandContext -> commandContext.get("string")
.handler(commandContext -> commandContext.getOptional("string")
.ifPresent(
System.out::println))
.build())