mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Fix multiversion issues with levitation, fix more stacktraces
This commit is contained in:
1 parent
6497891e43
commit
9473781a26
5 files changed
+13
-47
No files matched your search
@@ -20,6 +20,7 @@ package com.rammelkast.anticheatreloaded.util;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
|
||||
@@ -111,6 +112,15 @@ public class MovementManager {
|
||||
if (Utilities.couldBeOnBoat(player, 0.25, true) && !Utilities.isSubmersed(player))
|
||||
this.onGround = true;
|
||||
|
||||
// Handle 1.9+ potion effects
|
||||
if (MinecraftVersion.atOrAbove(MinecraftVersion.COMBAT_UPDATE)) {
|
||||
for (PotionEffect effect : player.getActivePotionEffects()) {
|
||||
if (!VersionUtil.isLevitationEffect(effect))
|
||||
return;
|
||||
AntiCheatReloaded.getManager().getBackend().logLevitating(player, 1);
|
||||
}
|
||||
}
|
||||
|
||||
this.touchedGroundThisTick = false;
|
||||
this.halfMovement = false;
|
||||
if (!this.onGround) {
|
||||
|
||||
Reference in new issue
Block a user