EntityEvents.hurt('takesapillage:legioner', event => {
    const player = event.source.player
    const mob = event.entity

    if (!player) return
    // event.server.tell(player)
    mob.potionEffects.add(`minecraft:slowness`, 40, 3, false, true)
    // mob.server.runCommandSilent(`effect give @e[type=takesapillage:legioner] slowness 5 2`)
    mob.server.scheduleInTicks(40, t => {
        //     mob.server.runCommandSilent(`effect give @e[type=takesapillage:legioner] speed 5 10`)
    mob.potionEffects.add(`minecraft:speed`, 25, 3, false, true)
    })
})