From 0fd603bbd8dc4d94480f8de0b076dee03e1652aa Mon Sep 17 00:00:00 2001 From: Wyatt Childers Date: Sat, 5 Mar 2016 17:35:45 -0500 Subject: [PATCH] Corrected some issues with sending raw messages on the Sponge platform --- .../main/java/com/sk89q/worldedit/sponge/SpongePlayer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java index 7a681a787..54195e67a 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java @@ -30,11 +30,15 @@ import com.sk89q.worldedit.internal.LocalWorldAdapter; import com.sk89q.worldedit.internal.cui.CUIEvent; import com.sk89q.worldedit.session.SessionKey; import com.sk89q.worldedit.util.Location; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.util.ChatComponentText; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.item.inventory.ItemStack; +import org.spongepowered.api.text.LiteralText; import org.spongepowered.api.text.Text; import org.spongepowered.api.text.format.TextColor; import org.spongepowered.api.text.format.TextColors; +import org.spongepowered.api.text.serializer.TextSerializers; import org.spongepowered.api.world.World; import javax.annotation.Nullable; @@ -117,7 +121,7 @@ public class SpongePlayer extends AbstractPlayerActor { @Override public void printRaw(String msg) { for (String part : msg.split("\n")) { - this.player.sendMessage(Text.of(part)); + this.player.sendMessage(TextSerializers.LEGACY_FORMATTING_CODE.deserialize(part)); } }