Player Death Event

Discussion in 'Plugin Development' started by MckenzieSkullKid, 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:
        public void onPlayerDeath(PlayerDeathEvent event)
            Player player = event.getEntity();
            player.getLocation().getWorld().playEffect(player.getLocation(), Effect.SMOKE, 1);
    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