mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Fix 1.8.8 support, fix false positive with scaffolding
This commit is contained in:
1 parent
a59a4baf28
commit
e770d0e01c
5 files changed
+28
-12
No files matched your search
@@ -136,14 +136,15 @@ public class VersionUtil {
|
||||
|
||||
public static int getPotionLevel(Player player, PotionEffectType type) {
|
||||
if (isBountifulUpdate()) {
|
||||
for (PotionEffect effect : player.getActivePotionEffects())
|
||||
if (effect.getType() == type)
|
||||
for (PotionEffect effect : player.getActivePotionEffects()) {
|
||||
if (effect.getType().equals(type))
|
||||
return effect.getAmplifier() + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (player.hasPotionEffect(PotionEffectType.JUMP))
|
||||
return player.getPotionEffect(PotionEffectType.JUMP).getAmplifier() + 1;
|
||||
if (player.hasPotionEffect(type))
|
||||
return player.getPotionEffect(type).getAmplifier() + 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user