mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-09-05 17:07:06 +02:00
Escape placeholder pattern. fixes #4
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
|
||||
<version>2.8.5</version>
|
||||
<version>2.8.5-Dev-${BUILD_NUMBER}</version>
|
||||
<name>PlaceholderAPI</name>
|
||||
<description>An awesome placeholder provider!</description>
|
||||
<url>http://extendedclip.com</url>
|
||||
|
@@ -200,7 +200,7 @@ public class PlaceholderAPI {
|
||||
if (hooks.containsKey(identifier)) {
|
||||
String value = hooks.get(identifier).onPlaceholderRequest(player, params);
|
||||
if (value != null) {
|
||||
text = text.replaceAll(m.group(), Matcher.quoteReplacement(value));
|
||||
text = text.replaceAll(Pattern.quote(m.group()), Matcher.quoteReplacement(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -250,7 +250,7 @@ public class PlaceholderAPI {
|
||||
Relational rel = (Relational) hooks.get(identifier);
|
||||
String value = rel.onPlaceholderRequest(one, two, params);
|
||||
if (value != null) {
|
||||
text = text.replaceAll(m.group(), Matcher.quoteReplacement(value));
|
||||
text = text.replaceAll(Pattern.quote(m.group()), Matcher.quoteReplacement(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user