Makes both String[] and List<String> available for string formatting
All checks were successful
KnarCraft/KnarLib/pipeline/head This commit looks good
All checks were successful
KnarCraft/KnarLib/pipeline/head This commit looks good
This commit is contained in:
@@ -2,6 +2,7 @@ package net.knarcraft.knarlib.formatting;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -71,8 +72,8 @@ public final class StringReplacer {
|
||||
* @return <p>The string with placeholders replaced</p>
|
||||
*/
|
||||
public @NotNull String replace(@NotNull String input) {
|
||||
return StringFormatter.replacePlaceholders(input, replacements.keySet().toArray(new String[0]),
|
||||
replacements.values().toArray(new String[0]));
|
||||
return StringFormatter.replacePlaceholders(input, new ArrayList<>(replacements.keySet()),
|
||||
new ArrayList<>(replacements.values()));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user