Update for ChatStyle changes in SpoutAPI

This commit is contained in:
zml2008 2012-07-04 13:11:57 -07:00
parent dc17c8d064
commit ca6ee43f9d
2 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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);
}
}