Skip to content

Commit

Permalink
Fix MCStrings#match methods
Browse files Browse the repository at this point in the history
  • Loading branch information
xDec0de committed Nov 4, 2024
1 parent c78cc1b commit 92c6609
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,9 @@ public static String match(@NotNull String src, @NotNull CharSequence from, @Not
*/
@NotNull
public static String match(@NotNull String src, @NotNull CharSequence from, @NotNull CharSequence to, @NotNull Consumer<String> action, boolean remove) {
return match(src, from, to, remove ? match -> "" : match -> match);
return match(src, from, to, remove ?
match -> {action.accept(match); return "";} :
match -> {action.accept(match); return match;});
}

/**
Expand Down

0 comments on commit 92c6609

Please sign in to comment.