Need help, doesn't detect death?

I tried event.getPlayer but that didn't work, so I tried
event.getEntity.