mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Fix throw when placeholder contains '$'
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -105,12 +105,12 @@ public final class PlaceholderAPIMiniMessageParser {
|
|||||||
final String replaced = placeholderResolver.apply(match);
|
final String replaced = placeholderResolver.apply(match);
|
||||||
|
|
||||||
if (match.equals(replaced) || !containsLegacyColorCodes(replaced)) {
|
if (match.equals(replaced) || !containsLegacyColorCodes(replaced)) {
|
||||||
matcher.appendReplacement(builder, replaced);
|
matcher.appendReplacement(builder, Matcher.quoteReplacement(replaced));
|
||||||
} else {
|
} else {
|
||||||
final String key = "papi_generated_template_" + id;
|
final String key = "papi_generated_template_" + id;
|
||||||
id++;
|
id++;
|
||||||
templates.add(Template.template(key, LegacyComponentSerializer.legacySection().deserialize(replaced)));
|
templates.add(Template.template(key, LegacyComponentSerializer.legacySection().deserialize(replaced)));
|
||||||
matcher.appendReplacement(builder, "<" + key + ">");
|
matcher.appendReplacement(builder, Matcher.quoteReplacement("<" + key + ">"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user