1. Greetings.
    Is it possible to fix warnings about hook usage conflict? At 1 side coding (mean only in 1 plugin), with saving fuctionality of both.
    Example:
    2 plugins use OnPlayerChat
     
  2. Wulf

    Wulf Community Admin

    Generally they aren't actually conflicts, just warnings about possible conflicts. The only time it'd really be a conflict is if you are both trying to modify what the hook returns, which in the case of OnPlayerChat it would be the chat output to each client.

    What are you hooking into OnPlayerChat for? Are you listening for a command?
     
  3. It's about my plugin AutoWipeReple, which just block or pass messages, without modding or something, but as you can read in plugin-discuss, on every chat message it shows Warning in console about conflict.
    I do understand what this is just a warning, and have no errors or smth, but still.
    I understand what this can be fixed editing both plugins to see each other, but 1 side dev? is it possible?
     
  4. Wulf

    Wulf Community Admin

    Ideally there would be a better method and API to handle multiple plugins modifying the chat, but for now you'd likely have to detect the other plugin and pass the message through it and block as needed. I believe that your plugin will have to be loaded before the other plugin in order to block messages from it as well, else you'll likely miss some or get duplicates.
     
  5. How to do it? 1 plugin what handle chat? and others under controll of it? Seems to be logical, but that will cause dependency.
     
  6. you could use: onruncommand and detect when chat.say is used
    instead of onplayerchat
     
  7. Wulf

    Wulf Community Admin

    You don't have to depend on the plugin, just check for it and let it handle the messages if you do have to send any. I don't think you can avoid the conflict warning if you cancel though.
     
  8. Thanks, will try to do it in the future versions.

    As the result of topic as i understood this:
    There is no way at the moment to avoid conflicts of using some of the hooks in diff plugins.