mirror of
https://github.com/PlaceholderAPI/Javascript-Expansion.git
synced 2025-05-23 18:42:44 +00:00
Allow placeholders be parsed on javascript result
This commit is contained in:
parent
1e36114287
commit
ebbeeb2062
@ -22,7 +22,6 @@ package com.extendedclip.papi.expansion.javascript;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.script.ScriptEngine;
|
||||
@ -219,10 +218,11 @@ public class JavascriptPlaceholder {
|
||||
}
|
||||
|
||||
if (result instanceof String) {
|
||||
return result != null ? (String) result : "";
|
||||
String res = PlaceholderAPI.setPlaceholders(p, (String)result);
|
||||
return res != null ? res : "";
|
||||
}
|
||||
|
||||
return result != null ? result.toString() : "";
|
||||
return result != null ? PlaceholderAPI.setPlaceholders(p, result.toString()) : "";
|
||||
|
||||
} catch (ScriptException ex) {
|
||||
PlaceholderAPIPlugin.getInstance().getLogger().severe("Error in javascript format for placeholder - " + this.identifier);
|
||||
|
Loading…
x
Reference in New Issue
Block a user