Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Damage player | EntityDamageByEntityEvent

Comments in 'Plugin Development' started by AlexBrin, May 12, 2016.

  1. AlexBrin
    Offline

    AlexBrin New Member

    Joined:
    Apr 23, 2016
    Posts:
    9
    Trying to use EntityDamageByEntityEvent, produces an error "does not have a handler list"
    How to use EntityDamageByEntityEvent? What event uses this class or how to register a handler?
  2. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    getDamager() is the function
  3. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    You can only use the event in EntityDamageEvent
    PHP:
    public function onDamage(EntityDamageEvent $event){
    if(
    $event instanceof EntityDamageByEntityEvent){

    }}
    ImagicalGamer and Legoboy0215 like this.
  4. AlexBrin
    Offline

    AlexBrin New Member

    Joined:
    Apr 23, 2016
    Posts:
    9
    Thank you so much! Figured out

Share This Page

Advertisement