diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java index d477f955ab..616b2cc591 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java @@ -55,7 +55,7 @@ public TeleportCommand() { // Optionally specify "relative" to use relative teleportation (Paper only). This is primarily useful only for players, but available for all entities. // Relative teleports are smoother for the client when teleporting over short distances. // Optionally, you may use "relative_axes:" to specify a set of axes to move relative on (and other axes will be treated as absolute), as any of "X", "Y", "Z", "YAW", "PITCH". - // Optionally, you may use "offthread_repeat:" with the relative arg to smooth out the teleport with a specified number of extra async packets sent within a single tick. + // Optionally, you may use "offthread_repeat:" with the relative arg when teleporting a player to smooth out the teleport with a specified number of extra async packets sent within a single tick. // Optionally, specify "offthread_yaw" or "offthread_pitch" while using offthread_repeat to smooth the player's yaw/pitch to the new location's yaw/pitch. // // Optionally, specify additional teleport options using the 'entity_options:' arguments (Paper only). diff --git a/plugin/src/main/java/com/denizenscript/denizen/utilities/FormattedTextHelper.java b/plugin/src/main/java/com/denizenscript/denizen/utilities/FormattedTextHelper.java index 6fb1e8878d..6bf8cddc26 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/utilities/FormattedTextHelper.java +++ b/plugin/src/main/java/com/denizenscript/denizen/utilities/FormattedTextHelper.java @@ -504,6 +504,12 @@ public static BaseComponent[] parseInternal(String str, ChatColor baseColor, boo if (str.startsWith(ChatColor.COLOR_CHAR + "[translate=") && str.indexOf(']') == str.length() - 1) { return new BaseComponent[] {parseTranslatable(str.substring("&[translate=".length(), str.length() - 1), baseColor, optimize)}; } + if (str.length() > 3 && str.startsWith((ChatColor.COLOR_CHAR + "")) && hexMatcher.isMatch(str.charAt(1)) + && str.startsWith(ChatColor.COLOR_CHAR + "[translate=", 2) && str.indexOf(']') == str.length() - 1) { // eg "&6&[translate=block.minecraft.ominous_banner]" + TranslatableComponent component = parseTranslatable(str.substring("&[translate=".length() + 2, str.length() - 1), baseColor, optimize); + component.setColor(ChatColor.getByChar(str.charAt(1))); + return new BaseComponent[] {component}; + } } if (!optimize) { optimize = str.contains(ChatColor.COLOR_CHAR + "[optimize=true]");