Skip to content

Commit

Permalink
Allow tags in <text> in format scripts
Browse files Browse the repository at this point in the history
Pay no mind to severe cheating going on
  • Loading branch information
mcmonkey4eva committed Jun 24, 2015
1 parent 95d6152 commit 8e18280
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -8,6 +8,7 @@
import net.aufdemrand.denizencore.scripts.containers.ScriptContainer;
import net.aufdemrand.denizen.tags.BukkitTagContext;
import net.aufdemrand.denizencore.tags.TagManager;
import net.aufdemrand.denizencore.tags.core.EscapeTags;
import net.aufdemrand.denizencore.utilities.YamlConfiguration;

public class FormatScriptContainer extends ScriptContainer {
Expand Down Expand Up @@ -81,7 +82,7 @@ public String getFormattedText(ScriptEntry entry) {
}

public String getFormattedText(String textToReplace, dNPC npc, dPlayer player) {
String text = getFormat().replace("<text>", TagManager.escapeOutput(textToReplace));
String text = getFormat().replace("<text", "<el@val[" + EscapeTags.Escape(textToReplace) + "].unescaped");
return TagManager.tag(text, new BukkitTagContext(player, npc, false, null, shouldDebug(), new dScript(this)));
}

Expand Down

0 comments on commit 8e18280

Please sign in to comment.