EntityEvents.hurt(event => {
    if (!event.source.actual) return;
    if (event.source.actual.getType() !== 'minecraft:player') return;
    let source = event.source.actual;
    let entity = event.entity;
    palladium.abilities.getEntries(source).forEach(entry => {
        if (entry.getConfiguration().ability.id == 'ninjago:potion_hit' && entry.enabled) {
            let effect_name = entry.getPropertyByName('effect');
            let effect_sec = entry.getPropertyByName('effect_seconds');
            let effect_amp = entry.getPropertyByName('effect_amplifier');
            entity.potionEffects.add(effect_name, effect_sec * 20, effect_amp, true, true);
        }
    })
});