From ca6ee43f9d3dbcaf819fa85d02c9c3021441087e Mon Sep 17 00:00:00 2001 From: zml2008 Date: Wed, 4 Jul 2012 13:11:57 -0700 Subject: [PATCH] Update for ChatStyle changes in SpoutAPI --- .../com/sk89q/worldedit/spout/SpoutCommandSender.java | 8 ++++---- src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java b/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java index e830363c9..fe6fb8c4b 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java @@ -28,7 +28,7 @@ import com.sk89q.worldedit.ServerInterface; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.bags.BlockBag; -import org.spout.api.ChatColor; +import org.spout.api.chat.style.ChatStyle; import org.spout.api.command.CommandSource; import org.spout.api.player.Player; @@ -55,18 +55,18 @@ public class SpoutCommandSender extends LocalPlayer { @Override public void printDebug(String msg) { - sender.sendMessage(ChatColor.GRAY + msg); + sender.sendMessage(ChatStyle.GRAY, msg); } @Override public void print(String msg) { - sender.sendMessage(ChatColor.PURPLE + msg); + sender.sendMessage(ChatStyle.PURPLE, msg); } @Override public void printError(String msg) { - sender.sendMessage(ChatColor.RED + msg); + sender.sendMessage(ChatStyle.RED, msg); } @Override diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java index 01c64ff22..6d89c25f6 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java @@ -30,6 +30,7 @@ import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.bags.BlockBag; import com.sk89q.worldedit.cui.CUIEvent; +import org.spout.api.chat.style.ChatStyle; import org.spout.api.entity.Entity; import org.spout.api.geo.discrete.Point; import org.spout.api.inventory.ItemStack; @@ -93,21 +94,21 @@ public class SpoutPlayer extends LocalPlayer { @Override public void print(String msg) { for (String part : msg.split("\n")) { - player.sendMessage("\u00A7d" + part); + player.sendMessage(ChatStyle.PINK, part); } } @Override public void printDebug(String msg) { for (String part : msg.split("\n")) { - player.sendMessage("\u00A77" + part); + player.sendMessage(ChatStyle.GRAY, part); } } @Override public void printError(String msg) { for (String part : msg.split("\n")) { - player.sendMessage("\u00A7c" + part); + player.sendMessage(ChatStyle.RED, part); } }