mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-08-31 00:39:43 +02:00
UNTESTED: fix for chatspy not working with CAPI chat integration
If it's still not working correctly, let me know
This commit is contained in:
parent
817a43b5e0
commit
02200e5793
|
@ -77,6 +77,13 @@ public class PluginCapiListener implements Listener
|
|||
if (event.getChannel().getId().equals("faction") && myFaction.isNormal())
|
||||
{
|
||||
event.getThem().addAll(myFaction.getOnlinePlayers());
|
||||
|
||||
// Send to any players who are spying chat... could probably be implemented better than this
|
||||
for (FPlayer fplayer : FPlayers.i.getOnline())
|
||||
{
|
||||
if(fplayer.isSpyingChat() && fplayer.getFaction() != myFaction)
|
||||
fplayer.sendMessage("[FCspy] "+myFaction.getTag()+": "+event.getMessage());
|
||||
}
|
||||
}
|
||||
else if (event.getChannel().getId().equals("allies"))
|
||||
{
|
||||
|
@ -84,9 +91,10 @@ public class PluginCapiListener implements Listener
|
|||
{
|
||||
FPlayer someFPlayer = FPlayers.i.get(somePlayer);
|
||||
if (someFPlayer.getRelationTo(fme).isAtLeast(Rel.ALLY))
|
||||
{
|
||||
event.getThem().add(somePlayer);
|
||||
}
|
||||
// Send to any players who are spying chat
|
||||
else if(someFPlayer.isSpyingChat())
|
||||
someFPlayer.sendMessage("[ACspy]: " + event.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class FactionsChatEarlyListener implements Listener
|
|||
for (FPlayer fplayer : FPlayers.i.getOnline())
|
||||
{
|
||||
if(fplayer.isSpyingChat() && fplayer.getFaction() != myFaction)
|
||||
fplayer.sendMessage("[FCspy] "+myFaction.getTag()+": "+message);
|
||||
fplayer.sendMessage("[FCspy] "+myFaction.getTag()+": "+message);
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
|
|
Loading…
Reference in New Issue
Block a user