From ab86705d3187abf3ebeae55e41312e02a91d4ba4 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 30 Dec 2010 12:43:59 -0800 Subject: [PATCH] Party chat fixed --- vMinecraftChat.java | 2 +- vMinecraftCommands.java | 8 ++++++-- vMinecraftListener.java | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/vMinecraftChat.java b/vMinecraftChat.java index 9b7a6fd42..3acd1f101 100644 --- a/vMinecraftChat.java +++ b/vMinecraftChat.java @@ -454,7 +454,7 @@ public class vMinecraftChat { for (Player p: etc.getServer().getPlayerList()){ if (p != null){ if (vMinecraftUsers.getProfile(p).inParty() && (vMinecraftUsers.getProfile(p).getParty().equals(vMinecraftUsers.getProfile(player).getParty()))){ - sendMessage(player, p, partychat + message); + sendMessage(player, p, partychat + Colors.Green + message); } } } diff --git a/vMinecraftCommands.java b/vMinecraftCommands.java index 95b8dd821..25c593397 100644 --- a/vMinecraftCommands.java +++ b/vMinecraftCommands.java @@ -185,9 +185,13 @@ public class vMinecraftCommands{ return EXIT_SUCCESS; } public static int partychat(Player player, String[] args){ + if (args.length < 1) { + player.sendMessage(Colors.Rose + "Usage is /p [Message]"); + return EXIT_SUCCESS; + } if(vMinecraftUsers.getProfile(player).inParty()){ - String message = args.toString(); - vMinecraftChat.partyChat(player, message); + String str = etc.combineSplit(0, args, " "); + vMinecraftChat.partyChat(player, str); return EXIT_SUCCESS; } else{ return EXIT_FAIL; diff --git a/vMinecraftListener.java b/vMinecraftListener.java index 17c3f903f..0d1d22da1 100644 --- a/vMinecraftListener.java +++ b/vMinecraftListener.java @@ -174,6 +174,9 @@ public class vMinecraftListener extends PluginListener { return false; } } + else { + return false; + } } } return false;