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