how to apply potion effects spigot code example
Example: bukkit give Player effect
<player>.addPotionEffect(new PotionEffect(PotionEffectType.HARM, <duration>, <amplifier>));
<player>.addPotionEffect(new PotionEffect(PotionEffectType.HARM, <duration>, <amplifier>));