Guest User

Untitled

a guest
Oct 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. package net.livecraft.bigpeking.DeathAnnouncer;
  2.  
  3. //insert these imports yourself
  4.  
  5. public class DeathTracer extends EntityListener {
  6.     public static DeathAnnouncer plugin;
  7.     public DeathTracer(DeathAnnouncer instance){
  8.         plugin = instance;
  9.     }
  10.     public void onEntityDeath(EntityDeathEvent event) {
  11.         if (event.getEntity() instanceof Player) {
  12.             plugin.getServer().broadcastMessage(ChatColor.AQUA+((Player)event.getEntity()).getName()+ChatColor.RED+" has died.");
  13.         }
  14.     }
  15.  
  16. }
Add Comment
Please, Sign In to add comment