import org.bukkit.potion.PotionEffect as PotionEffect import org.bukkit.potion.PotionEffectType as PotionEffectType @hook.event("entity.PotionSplashEvent", "high") def on_splash(event): potion_effects = event.getPotion().getEffects() for eff in potion_effects: if eff.getType() == PotionEffectType.HEAL: if eff.getAmplifier() > 250: event.setCancelled(True) break elif eff.getType() == PotionEffectType.HARM: if eff.getAmplifier() > 250: event.setCancelled(True) break