Hello all. I am working on a damage event. However, when the player is being hit quickly, it wont run but when they are running and aren't hit every second, it does run. Code (Text): @EventHandler(priority = EventPriority.LOWEST) public void killedByEntity(EntityDamageByEntityEvent e) { if(e.getDamager() instanceof Player && e.getEntity() instanceof Player) { Player damager = (Player) e.getDamager(); Player damaged = (Player) e.getEntity(); if(damaged.getHealth() < 2) { VisualUtils.sendLightning(damaged.getLocation()); } } } I use this because I have instant respawn in a different plugin so I check in this- but like above, most of the time, it won't run. How can I fix this? Thanks.
Use playerdeathEvent and get deathlocation by getting location of the player and send the lightning effect.