Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onEntityDeath(EntityDeathEvent event){
- if (event.getEntity() instanceof Player)
- {
- Player player = (Player)event.getEntity();
- if (player.getLastDamageCause().getCause() == DamageCause.PROJECTILE)
- {
- player.sendMessage("Killed by Arrow");
- }
- player.teleport(player.getWorld().getSpawnLocation());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment