Fix sponge-api change

This commit is contained in:
Lukas Rieger (Blue) 2022-01-09 14:33:31 +01:00
parent 921ddcfbc3
commit 2033d91497
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -122,7 +122,7 @@ public void update() {
Optional<List<PotionEffect>> effects = player.get(Keys.POTION_EFFECTS);
if (effects.isPresent()) {
for (PotionEffect effect : effects.get()) {
if (effect.type().equals(PotionEffectTypes.INVISIBILITY.get()) && effect.duration() > 0) invis = true;
if (effect.type().equals(PotionEffectTypes.INVISIBILITY.get()) && effect.duration().ticks() > 0) invis = true;
}
}
}