final Entity entity = event.getEntity();
if (!(entity instanceof Player)) return;
final Player player = (Player) entity;
final CombinedConfig cc = CombinedConfig.getConfig(player);
if (!cc.invulnerableCheck) return;
final DamageCause cause = event.getCause();
// Ignored causes.
if (cc.invulnerableIgnore.contains(cause)) return;
// Modified invulnerable ticks.
Integer modifier = cc.invulnerableModifiers.get(cause);
if (modifier == null) modifier = cc.invulnerableModifierDefault;