mirror of
https://github.com/PlaceholderAPI/Javascript-Expansion.git
synced 2025-05-23 18:42:44 +00:00
placeholders parsed after the javascript is evaluated need to use {}
Placeholders that use %<placeholder>% are parsed before the script is evaluated so the ability to store or utilize raw placeholders was not possible. Now if you use {<placeholder>}, placeholders with brackets are parsed after the script has been evaluated.
This commit is contained in:
parent
ebbeeb2062
commit
410b021b0b
@ -218,11 +218,11 @@ public class JavascriptPlaceholder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result instanceof String) {
|
if (result instanceof String) {
|
||||||
String res = PlaceholderAPI.setPlaceholders(p, (String)result);
|
String res = PlaceholderAPI.setBracketPlaceholders(p, (String)result);
|
||||||
return res != null ? res : "";
|
return res != null ? res : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return result != null ? PlaceholderAPI.setPlaceholders(p, result.toString()) : "";
|
return result != null ? PlaceholderAPI.setBracketPlaceholders(p, result.toString()) : "";
|
||||||
|
|
||||||
} catch (ScriptException ex) {
|
} catch (ScriptException ex) {
|
||||||
PlaceholderAPIPlugin.getInstance().getLogger().severe("Error in javascript format for placeholder - " + this.identifier);
|
PlaceholderAPIPlugin.getInstance().getLogger().severe("Error in javascript format for placeholder - " + this.identifier);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user