broadcastPotionEffect
fun broadcastPotionEffect(potionEffectType: PotionEffectType, duration: Int, amplifier: Int, playerPredicate: Predicate<SpigotPlayer> = Predicate { true })
Broadcasts a potion effect to all players who meet the specified condition.
This method applies the specified potion effect to all players that satisfy the provided predicate. The effect includes type, duration, and amplifier.
Parameters
potionEffectType
The type of the potion effect to be applied.
duration
The duration of the potion effect, in ticks.
amplifier
The amplifier (or strength) of the potion effect.
playerPredicate
A predicate function to filter players. Only players satisfying this condition will receive the potion effect. Defaults to a predicate that includes all players.