spigot disable health regeneration

Solutions on MaxInterview for spigot disable health regeneration by the best coders in the world

showing results for - "spigot disable health regeneration"
Isidora
02 Nov 2020
1    @EventHandler
2    public void onPlayerRegainHealth(EntityRegainHealthEvent event) {
3        if(event.getRegainReason() == RegainReason.SATIATED || event.getRegainReason() == RegainReason.REGEN)
4            event.setCancelled(true);
5    }