Player Death Event

Discussion in 'Plugin Development' started by MckenzieSkullKid, Feb 16, 2013.

Thread Status:
Not open for further replies.
  1. How would I create a smoke particle effect at the players location when they die?
  2. Look here.
  3. On the death event though i am not able to get the players location
  4. event.getEntity().getWorld() ?
    event.getEntity().getLocation() ?
  5. Code (Text):
    1.     @EventHandler(priority=EventPriority.LOW)
    2.     public void onPlayerDeath(PlayerDeathEvent event)
    3.     {
    4.         Player player = event.getEntity();
    5.         player.getLocation().getWorld().playEffect(player.getLocation(), Effect.SMOKE, 1);
    6.     }
    Maybe this works, haven't tested it.
  6. Wolftic . That should work there, but you can also set sounds and other effects as long as it works with the event set.
Thread Status:
Not open for further replies.

Share This Page