mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Unchecked attempt at fixing 1.8 compat issues
This commit is contained in:
1 parent
7caf7376ba
commit
a59a4baf28
5 files changed
+26
-13
No files matched your search
@@ -134,4 +134,16 @@ public class VersionUtil {
|
||||
return effect.getType().equals(PotionEffectType.LEVITATION);
|
||||
}
|
||||
|
||||
public static int getPotionLevel(Player player, PotionEffectType type) {
|
||||
if (isBountifulUpdate()) {
|
||||
for (PotionEffect effect : player.getActivePotionEffects())
|
||||
if (effect.getType() == type)
|
||||
return effect.getAmplifier() + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (player.hasPotionEffect(PotionEffectType.JUMP))
|
||||
return player.getPotionEffect(PotionEffectType.JUMP).getAmplifier() + 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user