Skip to content

Commit 057c83d

Browse files
committed
Fixes #1
1 parent 156102e commit 057c83d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/cz/foresttech/api/ColorAPI.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public class ColorAPI {
1717
private static final Pattern patternNormal = Pattern.compile("\\{#([0-9A-Fa-f]{6})\\}");
1818
private static final Pattern patternGrad = Pattern.compile("\\{#([0-9A-Fa-f]{6})>\\}(.*?)\\{#([0-9A-Fa-f]{6})<\\}");
1919
private static final Pattern patternOneFromTwo = Pattern.compile("\\{#([0-9A-Fa-f]{6})<>\\}");
20-
private static Matcher matcher;
2120

2221
/**
2322
* Here we can select the type of colorize,
@@ -130,9 +129,9 @@ public static String colorizeClassic(String input) {
130129
* @return colored output with gradient
131130
*/
132131
public static String colorizeGradient(String input) {
133-
matcher = patternOneFromTwo.matcher(input);
132+
Matcher matcher = patternOneFromTwo.matcher(input);
134133

135-
StringBuffer output = new StringBuffer();
134+
StringBuilder output = new StringBuilder();
136135

137136
while (matcher.find()) {
138137
String text = matcher.group(1);

0 commit comments

Comments
 (0)