Corrected some issues with sending raw messages on the Sponge platform

This commit is contained in:
Wyatt Childers 2016-03-05 17:35:45 -05:00
parent 25c4a56e89
commit 0fd603bbd8

View File

@ -30,11 +30,15 @@ import com.sk89q.worldedit.internal.LocalWorldAdapter;
import com.sk89q.worldedit.internal.cui.CUIEvent; import com.sk89q.worldedit.internal.cui.CUIEvent;
import com.sk89q.worldedit.session.SessionKey; import com.sk89q.worldedit.session.SessionKey;
import com.sk89q.worldedit.util.Location; 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.entity.living.player.Player;
import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.api.text.LiteralText;
import org.spongepowered.api.text.Text; import org.spongepowered.api.text.Text;
import org.spongepowered.api.text.format.TextColor; import org.spongepowered.api.text.format.TextColor;
import org.spongepowered.api.text.format.TextColors; import org.spongepowered.api.text.format.TextColors;
import org.spongepowered.api.text.serializer.TextSerializers;
import org.spongepowered.api.world.World; import org.spongepowered.api.world.World;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -117,7 +121,7 @@ public class SpongePlayer extends AbstractPlayerActor {
@Override @Override
public void printRaw(String msg) { public void printRaw(String msg) {
for (String part : msg.split("\n")) { for (String part : msg.split("\n")) {
this.player.sendMessage(Text.of(part)); this.player.sendMessage(TextSerializers.LEGACY_FORMATTING_CODE.deserialize(part));
} }
} }