Fix throw when placeholder contains '$'

This commit is contained in:
Draycia committed 2021-12-17 17:41:27 -08:00
1 parent 45ee320753
commit ecb55e08db
1 file changed
+2 -2
@@ -105,12 +105,12 @@ public final class PlaceholderAPIMiniMessageParser {
final String replaced = placeholderResolver.apply(match);
if (match.equals(replaced) || !containsLegacyColorCodes(replaced)) {
matcher.appendReplacement(builder, replaced);
matcher.appendReplacement(builder, Matcher.quoteReplacement(replaced));
} else {
final String key = "papi_generated_template_" + id;
id++;
templates.add(Template.template(key, LegacyComponentSerializer.legacySection().deserialize(replaced)));
matcher.appendReplacement(builder, "<" + key + ">");
matcher.appendReplacement(builder, Matcher.quoteReplacement("<" + key + ">"));
}
}