Block death potions (#148)

Blocks all known death potions as it's possible to use amplifier 29, 61, 93 and 125 to get the same effect from it.
This commit is contained in:
CoolJWB 2019-09-15 18:49:24 +02:00 committed by Ivan
parent 9f4b48af5a
commit 4f339b29b8

View file

@ -80,7 +80,8 @@ public class PotionBlocker extends FreedomService
{
for (PotionEffect effect : effects)
{
if (effect.getType().equals(PotionEffectType.HEAL) && effect.getAmplifier() == 125)
int amplifier = effect.getAmplifier();
if (effect.getType().equals(PotionEffectType.HEAL) && (amplifier == 29 || amplifier == 61 || amplifier == 93 || amplifier == 125))
{
return true;
}