mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Make setPlaceholders behavior consistent with setRelationalPlaceholders
Relational placeholders require an underscore after the identifier to be considered valid. For example: `%rel_chatchat_%` is valid but `%rel_chatchat%` is not. Normal placeholders did not require this and `%chatchat%` worked the same as `%chatchat_%`.
This commit is contained in:
parent
e862abe0b4
commit
ef73b765de
@ -67,10 +67,14 @@ public final class CharsReplacer implements Replacer {
|
|||||||
hadSpace = true;
|
hadSpace = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p == closure.tail) {
|
if (p == closure.tail && identified) {
|
||||||
invalid = false;
|
invalid = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (p == closure.tail) {
|
||||||
|
identifier.append(p);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (p == '_' && !identified) {
|
if (p == '_' && !identified) {
|
||||||
identified = true;
|
identified = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user