Skip to content

Commit

Permalink
fix potion type comparisons
Browse files Browse the repository at this point in the history
oops, PotionType isn't an enum
  • Loading branch information
TehBrian committed Nov 20, 2023
1 parent 151f379 commit 32405ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void onMilkSplashPotion(final EntityPotionEffectEvent event) {
return;
}

if (newEffect.getType() == Milk.EFFECT
if (newEffect.getType().equals(Milk.EFFECT)
&& newEffect.getAmplifier() == Milk.AMPLIFIER
&& event.getEntity() instanceof final Player player) {
event.setCancelled(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void onPotionEffect(final EntityPotionEffectEvent event) {
return;
}

if (event.getNewEffect().getType() == PotionEffectType.BLINDNESS
if (event.getNewEffect().getType().equals(PotionEffectType.BLINDNESS)
&& Milieu.of(player) == Milieu.ONEROUS) {
return;
}
Expand Down

0 comments on commit 32405ab

Please sign in to comment.