File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
cloud-core/src/main/java/cloud/commandframework/arguments/parser Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 3131import cloud .commandframework .arguments .standard .ByteArgument ;
3232import cloud .commandframework .arguments .standard .CharArgument ;
3333import cloud .commandframework .arguments .standard .DoubleArgument ;
34+ import cloud .commandframework .arguments .standard .DurationArgument ;
3435import cloud .commandframework .arguments .standard .EnumArgument ;
3536import cloud .commandframework .arguments .standard .FloatArgument ;
3637import cloud .commandframework .arguments .standard .IntegerArgument ;
4344import io .leangen .geantyref .GenericTypeReflector ;
4445import io .leangen .geantyref .TypeToken ;
4546import java .lang .annotation .Annotation ;
47+ import java .time .Duration ;
4648import java .util .Arrays ;
4749import java .util .Collection ;
4850import java .util .HashMap ;
@@ -163,6 +165,7 @@ public StandardParserRegistry() {
163165 return new BooleanArgument .BooleanParser <>(liberal );
164166 });
165167 this .registerParserSupplier (TypeToken .get (UUID .class ), options -> new UUIDArgument .UUIDParser <>());
168+ this .registerParserSupplier (TypeToken .get (Duration .class ), options -> new DurationArgument .DurationParser <>());
166169 }
167170
168171 private static boolean isPrimitive (final @ NonNull TypeToken <?> type ) {
You can’t perform that action at this time.
0 commit comments