Slowness when hit by a snowball

Discussion in 'Plugin Development' started by drnose21, Jan 21, 2014.

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

    drnose21

    Hi how would I make it so that when a player was hit by another player they got the slowness effect I tried using an event but it didn't work thanks!
     
  2. Offline

    Warreo

    drnose21 Show us what you've got for code, that way you can learn for future projects/tasks. :)
     
  3. Offline

    d3v1n302418

    Check for an EntityDamageByEntityEvent, check if the damager(event.getDamager()) is a snowball, then check if the snowball's shooter was a Player AND the damaged(event.getEntity()) is a Player. Then just add the potion effect to the event.getEntity(); :)
     
Thread Status:
Not open for further replies.

Share This Page