1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Snowball damage

Discussion in 'Development' started by PadyPM, Sep 11, 2018.

  1. PadyPM

    PadyPM Creeper

    Messages:
    2
    GitHub:
    PadyPM
    public function hasarVerme(EntityDamageEvent $e){
    if($e instanceof EntityDamageByChildEntityEvent){
    $child = $e->getChild();
    if($child instanceof Snowball){
    $event->setModifier(5, EntityDamageEvent::CAUSE_ENTITY_ATTACK);
    }
    }
    }

    Code is not work ? Pls help
     
  2. SmartLord

    SmartLord Spider

    Messages:
    8
    GitHub:
    smartlord
    Change $event to $e
     
    xXNiceAssassinlo YT likes this.
  3. PadyPM

    PadyPM Creeper

    Messages:
    2
    GitHub:
    PadyPM
    Woow MyBad
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.