1.15.2 Modify plugin messages with ProtocolLib

Discussion in 'Spigot Plugin Development' started by TheDevelon, May 29, 2020.

  1. Hey, wanted to ask if there is a way to modify messages/notifications send by other plugins (wanna add multi-language support for my server). Is there any packet that I can use to listen for such messages?

    Example: /heal TheDevelon --> Successfully Healed You! (default)
    or /heal TheDevelon --> {IN ANOTHER LANGUAGE, modified via packets}

    So players are able to choose their language and I can modify the messages of other plugins to their language.

    Thanks in advance,
    TheDevelon.
     
  2. I'm fairly certain the "create a global censor" example they have up on their readme on their github page can do just that.
     
  3. But it does not listen for messages of other plugins? Tested with some debug msg, typed a command in-game, but my debug messages didn’t popped up as the help menu opened in chat..
     
  4. Perhaps you didn't initialize your class? Because I just checked and I'm using the very same chat packet to sensor every message for one of my clients.
    Since they wanted it to block URLs, and it kept blocking permission nodes, which look like URLs, I'm certain it worked for random plugin messages.