1.15.2 Listening to sendMessage events from other plugins

Discussion in 'Spigot Plugin Development' started by maxbridgland, Mar 6, 2020.

  1. Does AsyncPlayerChatEvent get triggered when a plugin calls Player#sendMessage()? I want to hook the message that plugins will send to players in different events that the server calls. These events being sendMessage to player and OnTabComplete. Is there any way I can grab the message without using ProtocolLib to intercept the ChatPackets?
     
  2. dont think theres a way
     
  3. Afaik, you have to use protocollib
     
  4. SteelPhoenix

    Moderator

    Tab completions are not chat packets and the only way to intercept outgoing chat messages to a player is by reading chat packets (which will include all messages including chat, plugin and server messages).