Change the message for some players.

Discussion in 'Plugin Development' started by boardinggamer, Nov 19, 2012.

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

    boardinggamer

    How can I change the message sent to some players.

    event.setFormat(); works to change the message but I want it to change the name color depending on who is receiving it.

    lets say playerA has the permission "namecolors.green" and playerB has "namecolors.red"
    how can I make playerA's messages have green names and playerB's messages have red names?
    not when they send them but receiving the messages.

    does this make sense?
     
  2. Offline

    ZeusAllMighty11

    Wait so like this:

    From a GUEST perspective of a conversation:
    Terry1212: Hi guys

    From a member example:
    Terry1212: Hi guys


    I won't work the way you're trying it. When you set the format of a message in the chat event, it sets it for the whole chat, which is all players. A different way to still do something similar, would be to cancel the chat event if the player is a 'special player', store their message and then send it again with sendMessage() method, and permissions.
     
Thread Status:
Not open for further replies.

Share This Page