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());
	}

}

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){
		if (e.entityLiving instanceof EntityPlayer){
		IRCHelper.postIRC(e.source.getDeathMessage(e.entityLiving).toString());
		}
	}

}

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