diff --git a/src/main/java/net/aufdemrand/denizen/scripts/commands/CommandExecuter.java b/src/main/java/net/aufdemrand/denizen/scripts/commands/CommandExecuter.java index f8ef707c49..33e5634a8f 100644 --- a/src/main/java/net/aufdemrand/denizen/scripts/commands/CommandExecuter.java +++ b/src/main/java/net/aufdemrand/denizen/scripts/commands/CommandExecuter.java @@ -58,7 +58,7 @@ public boolean execute(ScriptEntry scriptEntry) { definition = "null"; } dB.echoDebug(scriptEntry, "Filled definition %" + m.group(1) + "% with '" + definition + "'."); - m.appendReplacement(sb, definition.replace("$", "\\$")); + m.appendReplacement(sb, Matcher.quoteReplacement(definition)); } m.appendTail(sb); scriptEntry.setCommandName(sb.toString()); @@ -150,7 +150,7 @@ public boolean execute(ScriptEntry scriptEntry) { definition = "null"; } dB.echoDebug(scriptEntry, "Filled definition %" + m.group(1) + "% with '" + definition + "'."); - m.appendReplacement(sb, definition.replace("$", "\\$")); + m.appendReplacement(sb, Matcher.quoteReplacement(definition)); } m.appendTail(sb); arg = aH.Argument.valueOf(sb.toString());