Skip to content

Commit

Permalink
added boolean argument
Browse files Browse the repository at this point in the history
eric2788 committed Jan 1, 2025
1 parent 400e380 commit dca141e
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ class ArgumentScriptManager implements ScriptLoader, ArgumentParser, ScriptValid
if (parser == null) {
try {
return (T) arg.asType(literal.rawType)
}catch(Exception e){
}catch(Exception ignored){
throw new ArgumentParseException("your input '${arg}' is not appliable to type ${literal.rawType.simpleName}!")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package arguments

boolean apply(String arg) {
return arg.toBoolean()
}

0 comments on commit dca141e

Please sign in to comment.