1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-19 10:22:58 +01:00

Personal muting added.

This commit is contained in:
cerevisiae
2010-12-08 13:29:13 -06:00
parent 48fc69c220
commit 861ef59334
4 changed files with 160 additions and 33 deletions

View File

@@ -20,7 +20,15 @@ public class vMinecraftChat {
public static void gmsg(Player sender, String msg){
for (Player receiver : etc.getServer().getPlayerList()) {
if (receiver != null) {
sendMessage(sender, receiver, msg);
if(vMinecraftUsers.players.findProfile(receiver) == null)
return;
//Check if the person has the sender ignored
if(!vMinecraftUsers.players.findProfile(receiver).isIgnored(sender))
{
String[] message = applyColors(wordWrap(msg));
for(String out : message)
receiver.sendMessage(out);
}
}
}
}
@@ -32,9 +40,18 @@ public class vMinecraftChat {
//Use: Outputs a message to everybody
//=====================================================================
public static void sendMessage(Player sender, Player receiver, String msg){
String[] message = applyColors(wordWrap(msg));
for(String out : message)
receiver.sendMessage(out + " ");
//Check if the receiver has the sender ignored
if(vMinecraftUsers.players.findProfile(receiver) == null)
return;
if(!vMinecraftUsers.players.findProfile(receiver).isIgnored(sender))
{
String[] message = applyColors(wordWrap(msg));
for(String out : message)
receiver.sendMessage(out);
//Tell them if they are
} else
sendMessage(sender, sender, Colors.Rose + receiver.getName() + " has you " +
"on their ignore list.");
}
//=====================================================================