Soo I am creating a custom health plugin, I did the basics of it all and the on damage part of my code looks like Code (Text): @EventHandler public void onDamage(EntityDamageEvent event) { if (event.getEntity() instanceof Player) { Player p = (Player) event.getEntity(); event.setCancelled(true); setCurHealth(p, (int) (getCurHealth(p) - event.getDamage())); } } but when I do this I realized when I stand in fire I loose 1 health every tick, any fix?
Since you cancel the event and manage the damage manually the players no damage cooldown doesn't get activated. Therefore the fire doesn't have to wait until the ticks warn off and can damage you every tick. You can use Player#setNoDamageTicks() to prevent that