getRecipients - How about setRecipients ? ^^

Discussion in 'Plugin Development' started by Sammy, Mar 3, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Sammy

    I saw that DinnerBone added a getRecipients method it's cool and stuff butttt what I would like too know is a way to "setRecipients" without having to create a big chat plugin with rooms, can anyone point me the way ? :)
    --- merged: Mar 4, 2011 2:03 PM ---
    Hey, yesterday I got this to work.
    I was being dumb, I hadn't resisted the PLAYER_CHAT event on the right place, if someone has the same question here's the answer:

    You just need to do something like this
    Code:
      public void onPlayerChat(PlayerChatEvent event) {
          event.getRecipients().removeAll(playerList());
    }
    playerList = the list of players you don't want to receive the chat event

    Cheers
    SySammy
     
Thread Status:
Not open for further replies.

Share This Page