Skip to content

Commit

Permalink
Merge pull request #25 from Grabsky/fix-argument-type
Browse files Browse the repository at this point in the history
fix `CommodoreBukkitBrigadier#getArgumentType`
  • Loading branch information
Revxrsal authored Jun 8, 2022
2 parents 24305fd + 906ad8c commit 6e3de30
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ public CommodoreBukkitBrigadier(BukkitCommandHandler handler) {
}

public @NotNull ArgumentType<?> getArgumentType(@NotNull CommandParameter parameter) {
ArgumentType<?> type = argumentTypes.getFlexible(parameter.getType()).getArgumentType(parameter);
if (type != null)
return type;
ArgumentTypeResolver resolver = argumentTypes.getFlexible(parameter.getType());
if (resolver != null) {
ArgumentType<?> type = resolver.getArgumentType(parameter);
if (type != null)
return type;
}
return StringArgumentType.string();
}

Expand Down

0 comments on commit 6e3de30

Please sign in to comment.