Hello everyone.
First of all I'm junior modder but I have some time programming on Java so everything is ok.
Now, here is my question.
How can I apply potion effects to entities(mobs and players)? I'm using 1.12.2
I made an enchantment for the sword, and I want to apply slowness to every entity I hit.
I tried a lot of things and I've researched a lot before come here so, here is my "subscribeEvent" method
@SubscribeEvent
public static void enchantAttack(LivingAttackEvent event) {
Object attacker = event.getSource().getTrueSource();