What method do I need to use to send messages in sub-chats?

Discussion in 'Plugin Development' started by DragsZombies, Sep 30, 2012.

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

    DragsZombies

    I'm trying to make a chat plugin and I don't know the method to use to have a player be able to send a message in the chat channel. I got it to deactivate and reactivate but that's about it. How would I set this up? Also, how would I be able to have multiple party chats? Because I can only get 1.
     
  2. Offline

    CorrieKay

    You need to create channel objects that store who is listening and who is chatting in the channels. Hold them in an overarching channel module/handler object that listens for chat events. Whenever someone chats, cancel the event, get the channel that theyre chatting to, and send the message to all of the players who are listening to the channel.

    If you'd like, take a look at some of my code:
    chat handler object
    channel object
    PlayerChatEvent
    broadcasting to a channel
     
    ventrec likes this.
  3. Offline

    DragsZombies

    I kinda understand what you are saying CorrieKay, If you could, can you possibly simplify it? I'm new to coding, so I don't understand some of this stuff. Thanks!
     
Thread Status:
Not open for further replies.

Share This Page