[M_BosS] How to send a message when the player attacks a desired mob?

Discussion in 'Plugin Development' started by StringDeveloper, May 19, 2018.

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

    StringDeveloper

    Hello, I was developing a plugin, I decided to create a BOSS, but for this I needed that when the player did damage to the mob, it would automatically send a message to the player.
    Does anyone know how to do this?


    *English may be wrong because I'm Brazilian: p

    Sincerely, String.
     
  2. Offline

    Surrend3r

    Listen to the event EntityDamageByEntityEvent than check if the damager is the player and if the entity that is getting damaged is the boss, if true than send a message to the player
     
    Last edited: May 21, 2018
    StringDeveloper likes this.
  3. Offline

    MightyOne

    @Surrend3r Ackchually its not creating the event but listening to it
     
    Last edited: May 21, 2018
    Zombie_Striker likes this.
  4. Offline

    StringDeveloper

    Last edited by a moderator: May 20, 2018
  5. Offline

    Surrend3r

    oh yeah sorry...
     
    Last edited by a moderator: May 21, 2018
  6. Offline

    KarimAKL

    @Surrend3r If this is solved then please change the title prefix to solved. EDIT: Whoops, wrong person. :7 Meant for @StringDeveloper. :p
     
    Last edited by a moderator: May 25, 2018
  7. Offline

    Surrend3r

    not
    my
    thread.
     
  8. Offline

    KarimAKL

Thread Status:
Not open for further replies.

Share This Page