Skip to content

Commit

Permalink
Make the KEY_DURATION required in SetDurationCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
md5sha256 committed Mar 24, 2024
1 parent 745895c commit 7687a9b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
@Singleton
public class SetDurationCommand extends AreashopCommandBean {

private static final CloudKey<String> KEY_DURATION = CloudKey.of("amount", String.class);
private static final DurationInputParser<CommandSender> DURATION_PARSER = new DurationInputParser<>();
private static final CloudKey<String> KEY_DURATION = CloudKey.of("duration", String.class);
private final MessageBridge messageBridge;
private final CommandFlag<RentRegion> regionFlag;

Expand Down Expand Up @@ -66,7 +65,7 @@ public String stringDescription() {
@Override
protected Command.Builder<? extends CommandSender> configureCommand(@NotNull Command.Builder<CommandSender> builder) {
return builder.literal("setduration")
.optional(KEY_DURATION, StringParser.stringParser())
.required(KEY_DURATION, StringParser.stringParser())
.flag(this.regionFlag)
.handler(this::handleCommand);
}
Expand Down

0 comments on commit 7687a9b

Please sign in to comment.