Mod chat issue fix.
This commit is contained in:
parent
3543030e64
commit
cfb64ea316
@ -54,11 +54,14 @@ public class FactionsChatListener implements Listener {
|
|||||||
String message = String.format(Conf.modChatFormat, ChatColor.stripColor(me.getNameAndTag()), msg);
|
String message = String.format(Conf.modChatFormat, ChatColor.stripColor(me.getNameAndTag()), msg);
|
||||||
|
|
||||||
//Send to all mods
|
//Send to all mods
|
||||||
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
|
if (me.getRole().isAtLeast(Role.MODERATOR)) {
|
||||||
if (myFaction == fplayer.getFaction() && fplayer.getRole().isAtLeast(Role.MODERATOR)) {
|
// Iterates only through the factions' members so we enhance performance.
|
||||||
fplayer.sendMessage(message);
|
for (FPlayer fplayer : myFaction.getFPlayers()) {
|
||||||
} else if (fplayer.isSpyingChat() && me != fplayer) {
|
if (fplayer.getRole().isAtLeast(Role.MODERATOR)) {
|
||||||
fplayer.sendMessage("[MCspy]: " + message);
|
fplayer.sendMessage(message);
|
||||||
|
} else if (fplayer.isSpyingChat() && me != fplayer) {
|
||||||
|
fplayer.sendMessage("[MCspy]: " + message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user