Fix speed false positive with Elytra (following #202)

This commit is contained in:
Rammelkast committed 2021-12-16 16:17:50 +01:00
1 parent e71707a84c
commit 5b33eb5b9d
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.rammelkast.anticheatreloaded</groupId>
<artifactId>AntiCheatReloaded</artifactId>
<version>1.10.2-PRE</version>
<version>1.10.3-PRE</version>
<name>AntiCheatReloaded</name>
<url>https://www.spigotmc.org/resources/anticheatreloaded.23799/</url>
<properties>
@@ -30,11 +30,10 @@ import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.util.Vector;
import com.cryptomorin.xseries.XMaterial;
import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
import com.rammelkast.anticheatreloaded.check.CheckResult;
import com.rammelkast.anticheatreloaded.check.CheckType;
import com.rammelkast.anticheatreloaded.check.CheckResult.Result;
import com.rammelkast.anticheatreloaded.check.CheckType;
import com.rammelkast.anticheatreloaded.config.providers.Checks;
import com.rammelkast.anticheatreloaded.util.MovementManager;
import com.rammelkast.anticheatreloaded.util.User;
@@ -99,7 +98,7 @@ public final class KillAuraCheck {
final Entity entity = event.getEntity();
// Do not check while in vehicles
if (player.getVehicle() != null || entity.getVehicle() != null || player.getItemInUse() == XMaterial.TRIDENT.parseItem()) {
if (player.getVehicle() != null || entity.getVehicle() != null || player.isRiptiding()) {
return PASS;
}
@@ -247,7 +247,8 @@ public final class SpeedCheck {
if (checksConfig.isSubcheckEnabled(CheckType.SPEED, "jumpBehaviour") && movementManager.touchedGroundThisTick
&& !boxedIn && movementManager.slimeInfluenceTicks <= 10 && !Utilities.isNearHalfblock(movingTowards)
&& !Utilities.isNearHalfblock(movingTowards.clone().subtract(0, 0.51, 0))
&& !Utilities.couldBeOnBoat(player, 0.8d, false)) {
&& !Utilities.couldBeOnBoat(player, 0.8, false)
&& movementManager.elytraEffectTicks <= 0) {
// This happens naturally
if (movementManager.airTicksBeforeGrounded == movementManager.groundTicks) {
final double minimumDistXZ = checksConfig.getDouble(CheckType.SPEED, "jumpBehaviour", "minimumDistXZ"); // Default