Skip to content

Commit

Permalink
Inline some variables
Browse files Browse the repository at this point in the history
Signed-off-by: BT (calcastor/mame) <[email protected]>
  • Loading branch information
calcastor committed May 22, 2024
1 parent d57226b commit 2004afe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ public final class DurationParser
public @NotNull ArgumentParseResult<Duration> parse(
final @NotNull CommandContext<CommandSender> context,
final @NotNull CommandInput inputQueue) {
final String input = inputQueue.peekString();
try {
Duration result = TextParser.parseDuration(input);
Duration result = TextParser.parseDuration(inputQueue.peekString());
inputQueue.readString();
return success(result);
} catch (TextException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ public final class PlayerParser
@Override
public @NotNull List<@NotNull String> stringSuggestions(
@NotNull CommandContext<CommandSender> context, @NotNull CommandInput input) {
final String next = input.readString();
CommandSender sender = context.sender();

return Players.getPlayerNames(sender, next);
return Players.getPlayerNames(sender, input.readString());
}
}

0 comments on commit 2004afe

Please sign in to comment.