effect
fun effect(type: PotionEffectType, duration: Int, amplifier: Int, ambient: Boolean = false): PotionItem
Adds a PotionEffect to the potion.
Return
The PotionItem instance for method chaining.
Parameters
type
The type of potion effect to apply.
duration
The duration of the effect in ticks.
amplifier
The amplifier level of the effect.
ambient
Whether the effect is ambient (default is false
).