Getting message of player after plugin changes it

Discussion in 'Plugin Development' started by Maximumgame, Aug 19, 2014.

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

    Maximumgame

    I am using chatmanger and colored tags on a server and need to get the message and name of the player that is changed after using them. For example one player might have a prefix like [Mod] but using AsyncPlayerChatEvent and getting the message and player name with getMessage() and getName() will return what the player's name is without the use of those two plugins.

    So if player x who is a mod says "Hi guys" we see:

    [Mod]x: Hi guys

    But using the chat event will get us x as the player name and Hi Guys as the message, So essentially I am asking if there is someway to get the prefixes and suffixes added to a player's name from chatmanager and colored tags. Maybe there is someway to make my plugin look at the event after colored tags and chatmanger have changed them?
     
  2. Offline

    Necrodoom

    getDisplayName of the player, or getFormat off the event, depends on how the plugin adds its tags. Could be also both. Usually prefix/suffix will be added to displayname while tags will be added to format.
     
Thread Status:
Not open for further replies.

Share This Page