For entity death, handle EntityDeathEvent. https://github.com/PocketMine/Pocke...ketmine/event/entity/EntityDeathEvent.php#L64
An amazing plugin for Bukkit that adds a leveling up system to every skill in Minecraft. We just started working on it and I've mostly been studying the code of MCMMO for now, so it'll be a long while before mcpeMMO is done, but I'm really excited about it!