Clans Chat
This commit is contained in:
parent
b0ee2bb669
commit
e86bca99fd
@ -37,6 +37,7 @@ import mineplex.core.common.util.C;
|
|||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.NautHashMap;
|
import mineplex.core.common.util.NautHashMap;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.creature.Creature;
|
import mineplex.core.creature.Creature;
|
||||||
import mineplex.core.creature.event.CreatureSpawnCustomEvent;
|
import mineplex.core.creature.event.CreatureSpawnCustomEvent;
|
||||||
import mineplex.core.disguise.DisguiseManager;
|
import mineplex.core.disguise.DisguiseManager;
|
||||||
@ -485,7 +486,29 @@ public class ClansManager extends MiniClientPlugin<ClientClan> implements IRelat
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event.getRecipients().clear();
|
||||||
event.setFormat(C.cGold + clan.getName() + " " + C.cYellow + "%1$s " + C.cWhite + "%2$s");
|
event.setFormat(C.cGold + clan.getName() + " " + C.cYellow + "%1$s " + C.cWhite + "%2$s");
|
||||||
|
|
||||||
|
for (Player other : UtilServer.getPlayers())
|
||||||
|
{
|
||||||
|
if (other.equals(event.getPlayer()))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
ClanInfo otherClan = _clanUtility.getClanByPlayer(other);
|
||||||
|
|
||||||
|
if (otherClan == null)
|
||||||
|
{
|
||||||
|
event.getRecipients().add(other);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
String message = event.getMessage();
|
||||||
|
message = _chat.getFilteredMessage(event.getPlayer(), message);
|
||||||
|
ClanRelation rel = _clanUtility.rel(clan, otherClan);
|
||||||
|
String formatted = rel.getColor(true) + clan.getName() + " " + rel.getColor(false) + event.getPlayer().getName() + " " + C.cWhite + message;
|
||||||
|
other.sendMessage(formatted);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user