Very strange. I have noticed once that if(a!=b) and if(!(a==b)) acted differently on some occasions. Can't really explain how that happens (has to do something with auto-boxing i guess?). So try
if (!(this.getRace() == target.getRace()))
{
addItem("Loot", 6373, 1, this, true);
sendMessage("You won 1 PvP Skull from your enemy!");
}