From b54c8c1774e95c025c521cafcc5be9c49466ca13 Mon Sep 17 00:00:00 2001 From: Slimified <132033578+Slimified@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:25:14 -0700 Subject: [PATCH] Parse colors from broadcast world command (#5913) Make the broadcast world command mimic the behavior of the broadcast command which correctly parses colors from the broadcast message. Broadcast World Command Output Before: https://i.imgur.com/aFR6Zzb.png Broadcast World Command Output After: https://i.imgur.com/qrvb8XD.png --- .../earth2me/essentials/commands/Commandbroadcastworld.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandbroadcastworld.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandbroadcastworld.java index 93c271dca..6d44ba2ec 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandbroadcastworld.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandbroadcastworld.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.CommandSource; import com.earth2me.essentials.User; import com.earth2me.essentials.utils.AdventureUtil; +import com.earth2me.essentials.utils.FormatUtil; import com.google.common.collect.Lists; import net.ess3.api.TranslatableException; import org.bukkit.Server; @@ -53,7 +54,7 @@ public class Commandbroadcastworld extends EssentialsCommand { if (message.isEmpty()) { throw new NotEnoughArgumentsException(); } - ess.broadcastTl(null, u -> !u.getBase().getWorld().equals(world), true, "broadcast", message, AdventureUtil.parsed(AdventureUtil.legacyToMini(name))); + ess.broadcastTl(null, u -> !u.getBase().getWorld().equals(world), true, "broadcast", FormatUtil.replaceFormat(message).replace("\\n", "\n"), AdventureUtil.parsed(AdventureUtil.legacyToMini(name))); } @Override