h31ix

Untitled

Mar 24th, 2012
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. @EventHandler
  2. public void onEntityDeath(EntityDeathEvent event){
  3. if (event.getEntity() instanceof Player)
  4. {
  5. Player player = (Player)event.getEntity();
  6. if (player.getLastDamageCause().getCause() == DamageCause.PROJECTILE)
  7. {
  8. player.sendMessage("Killed by Arrow");
  9. }
  10. player.teleport(player.getWorld().getSpawnLocation());
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment