From ff46c2d6cc7358c3ec4eac533f475614ba3aee09 Mon Sep 17 00:00:00 2001 From: sovdee <10354869+sovdeeth@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:40:10 -0700 Subject: [PATCH] use quote() instead of replaceAll() --- src/main/java/ch/njol/skript/command/CommandUsage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ch/njol/skript/command/CommandUsage.java b/src/main/java/ch/njol/skript/command/CommandUsage.java index a7837a1241a..c746d93cf8a 100644 --- a/src/main/java/ch/njol/skript/command/CommandUsage.java +++ b/src/main/java/ch/njol/skript/command/CommandUsage.java @@ -49,7 +49,7 @@ public CommandUsage(@Nullable VariableString usage, String defaultUsage) { // Manually escape quotes. This is not a good solution, as it doesn't handle many other issues, like % in // commands, but in lieu of re-writing the argument parser and command logic completely, I believe this is // a decent stop-gap measure for using " in commands. - defaultUsage = defaultUsage.replaceAll("\"", "\"\""); + defaultUsage = VariableString.quote(defaultUsage); usage = VariableString.newInstance(defaultUsage); assert usage != null; }