@@ -0,0 +1,3169 @@
+package deterno.fight.tgm.damage.grave.listener;%0A%0Aimport deterno.fight.tgm.damage.grave.GravePlugin;%0Aimport deterno.fight.tgm.damage.grave.event.*;%0Aimport deterno.fight.tgm.damage.tracker.Lifetime;%0Aimport deterno.fight.tgm.damage.tracker.Lifetimes;%0Aimport org.bukkit.Location;%0Aimport org.bukkit.entity.LivingEntity;%0Aimport org.bukkit.entity.Player;%0Aimport org.bukkit.event.EventHandler;%0Aimport org.bukkit.event.Listener;%0Aimport org.bukkit.inventory.ItemStack;%0Aimport org.joda.time.Instant;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class PlayerListener implements Listener %7B%0A    private final GravePlugin grave;%0A%0A    public PlayerListener(GravePlugin grave) %7B%0A        this.grave = grave;%0A    %7D%0A%0A//    @EventHandler%0A//    public void onClick(InventoryClickEvent event)%7B%0A//    %09if(!(event.getWhoClicked() instanceof Player))%0A//    %09%09return;%0A//    %09Player player = (Player) event.getWhoClicked();%0A//    %09if(!player.getGameMode().equals(GameMode.CREATIVE) && event.getCurrentItem().getType().equals(Material.BOOK))%7B%0A//    %09%09event.setCancelled(true);%0A//    %09%7D%0A//    %7D%0A    %0A    @EventHandler%0A    public void onEntityDeath(org.bukkit.event.entity.EntityDeathEvent event) %7B%0A        LivingEntity entity = event.getEntity();%0A        Lifetime lifetime = Lifetimes.getLifetime(entity);%0A        Location location = entity.getLocation();%0A        Instant time = Instant.now();%0A%0A        EntityDeathEvent call;%0A%0A        int droppedExp = event.getDroppedExp();%0A        List%3CItemStack%3E drops = new ArrayList%3C%3E();%0A        drops.addAll(event.getDrops());%0A%0A        // EntityDeathEvent or EntityDeathBy____Event??%0A        if (lifetime.getLastDamage() == null %7C%7C lifetime.getLastDamage().getInfo().getResolvedDamager() == null) %7B%0A            if (entity instanceof Player)%0A                call = new PlayerDeathEvent((Player) entity, location, lifetime, time, drops, droppedExp);%0A            else%0A                call = new EntityDeathEvent(entity, location, lifetime, time, drops, droppedExp);%0A        %7D%0A        else %7B%0A            LivingEntity cause = lifetime.getLastDamage().getInfo().getResolvedDamager();%0A%0A            if (entity instanceof Player) %7B%0A                if (cause instanceof Player)%0A                    call = new PlayerDeathByPlayerEvent((Player) entity, location, lifetime, time, drops, droppedExp, (Player) cause);%0A                else%0A                    call = new PlayerDeathByEntityEvent%3C%3E((Player) entity, location, lifetime, time, drops, droppedExp, cause);%0A            %7D%0A            else %7B%0A                if (cause instanceof Player)%0A                    call = new EntityDeathByPlayerEvent(entity, location, lifetime, time, drops, droppedExp, (Player) cause);%0A                else%0A                    call = new EntityDeathByEntityEvent%3C%3E(entity, location, lifetime, time, drops, droppedExp, cause);%0A            %7D%0A        %7D%0A%0A        // Call event!%0A        grave.callEvent(call);%0A        %0A        // Apply changes in drops%0A//        event.getDrops().clear();%0A//        event.setDroppedExp(call.getDroppedExp());%0A//        for (ItemStack itemStack : call.getDrops())%0A//            location.getWorld().dropItemNaturally(location, itemStack);%0A%0A    %7D%0A%7D%0A

Create PlayerListener.java