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

i want help in my plugin

Discussion in 'Facepalm' started by kingryian, Aug 19, 2017.

  1. kingryian

    kingryian Creeper

    Messages:
    3
    GitHub:
    kingryian
    Hi guys, i want to set damge for bow 3 hearts how can i do it?
     
  2. xXSirButterXx

    xXSirButterXx Witch

    Messages:
    52
    GitHub:
    xxsirbutterxx
    This might work:
    PHP:
    public function onBowShoot(EntitySbhootBowEvent $e){
    if(
    $e->getEntity() instanceof Player){
    $e->setForce(3):
    }
    }
     
    KYUMA likes this.
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Why are you setting the force only if the entity is an instance of Player?
     
  4. xXSirButterXx

    xXSirButterXx Witch

    Messages:
    52
    GitHub:
    xxsirbutterxx
    Didnt have time to write it well when i wrote it. Bad example.
     
    jasonwynn10 likes this.
  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.