mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 06:28:52 +00:00
Fix #108, update XMaterial, start BoatFly
This commit is contained in:
1 parent
768331011e
commit
8de7ae1c59
4 files changed
+301
-166
No files matched your search
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* AntiCheatReloaded for Bukkit and Spigot.
|
||||
* Copyright (c) 2012-2015 AntiCheat Team
|
||||
* Copyright (c) 2016-2020 Rammelkast
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.rammelkast.anticheatreloaded.check.movement;
|
||||
|
||||
import com.rammelkast.anticheatreloaded.check.CheckResult;
|
||||
|
||||
public class BoatFlyCheck {
|
||||
|
||||
private static final CheckResult PASS = new CheckResult(CheckResult.Result.PASSED);
|
||||
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class FlightCheck {
|
||||
&& !Utilities.couldBeOnBoat(player)
|
||||
&& (System.currentTimeMillis() - movementManager.lastTeleport >= checksConfig
|
||||
.getInteger(CheckType.FLIGHT, "airFlight", "accountForTeleports"))
|
||||
&& !VersionUtil.isSlowFalling(player) && !Utilities.isInWeb(player)
|
||||
&& !VersionUtil.isSlowFalling(player) && !Utilities.isNearWeb(player)
|
||||
&& movementManager.elytraEffectTicks <= 25)
|
||||
return new CheckResult(CheckResult.Result.FAILED, "AirFlight", "had too little Y dropoff (diff="
|
||||
+ Math.abs(movementManager.motionY - movementManager.lastMotionY) + ")");
|
||||
@@ -155,7 +155,7 @@ public class FlightCheck {
|
||||
&& movementManager.motionY < 0 && !backend.justVelocity(player)
|
||||
&& (System.currentTimeMillis() - movementManager.lastTeleport >= checksConfig
|
||||
.getInteger(CheckType.FLIGHT, "gravity", "accountForTeleports"))
|
||||
&& !Utilities.isInWeb(player) && movementManager.elytraEffectTicks <= 25
|
||||
&& !Utilities.isNearWeb(player) && movementManager.elytraEffectTicks <= 25
|
||||
&& !VersionUtil.isSlowFalling(player)) {
|
||||
double gravitatedY = (movementManager.lastMotionY - 0.08) * GRAVITY_FRICTION;
|
||||
double offset = Math.abs(gravitatedY - movementManager.motionY);
|
||||
|
||||
Reference in new issue
Block a user