A simple plugin that prevents dryout and drowning damage for dolphins
@EventHandler
public void onEntityDamage(EntityDamageEvent event) {
if (event.getEntityType() != EntityType.DOLPHIN) return;
DamageCause cause = event.getCause();
if (cause == DamageCause.DROWNING) event.setCancelled(true);
if (cause == DamageCause.DRYOUT) event.setCancelled(true);
}