package com.forgeessentials.chat.irc;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import cpw.mods.fml.common.IPlayerTracker;

public class PlayerEventHandler implements IPlayerTracker{

	@Override
	public void onPlayerChangedDimension(EntityPlayer arg0) {}

	@Override
	public void onPlayerLogin(EntityPlayer arg0) {
		IRCHelper.postIRC(arg0.username + " joined the server.");
	}

	@Override
	public void onPlayerLogout(EntityPlayer arg0) {
		IRCHelper.postIRC(arg0.username + " left the server.");
	}

	@Override
	public void onPlayerRespawn(EntityPlayer arg0) {}
	
	@ForgeSubscribe
	public void onPlayerDeath(LivingDeathEvent e){
		IRCHelper.postIRC(e.source.getDeathMessage(e.entityLiving).toString());
	}

}

@@ -743,16 +743,63 @@
 ent e)%7B%0A
+%09%09if (e.entityLiving instanceof EntityPlayer)%7B%0A
 %09%09IRCHel
@@ -864,14 +864,18 @@
 ing());%0A
+%09%09%7D%0A
 %09%7D%0A%0A%7D%0A

Add EntityPlayer check for death messages - should close #950, let me know