Initial commit, working on a local server #31

Closed
davidpanic wants to merge 1 commits from dev into dev
Showing only changes of commit 10a5eea686 - Show all commits

20
killpotdisable.py Normal file
View File

@ -0,0 +1,20 @@
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