mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fix #130, fixed config mistake and added extra config option for BadPackets
This commit is contained in:
1 parent
e5c8c5dc8a
commit
7f9d3c1396
4 files changed
+11
-7
No files matched your search
@@ -31,9 +31,10 @@ import com.rammelkast.anticheatreloaded.manage.UserManager;
|
||||
import com.rammelkast.anticheatreloaded.util.Group;
|
||||
|
||||
/**
|
||||
* Developer's interface for all things AntiCheat.
|
||||
* Fired when a player fails an AntiCheatReloaded check
|
||||
* Will be replaced in ACR 2.0.0
|
||||
*/
|
||||
|
||||
@Deprecated
|
||||
public class AntiCheatAPI {
|
||||
private static CheckManager chk = AntiCheatReloaded.getManager().getCheckManager();
|
||||
private static UserManager umr = AntiCheatReloaded.getManager().getUserManager();
|
||||
|
||||
@@ -26,9 +26,10 @@ import com.rammelkast.anticheatreloaded.check.CheckType;
|
||||
import com.rammelkast.anticheatreloaded.util.User;
|
||||
|
||||
/**
|
||||
* Fired when a player fails an AntiCheat check
|
||||
* Fired when a player fails an AntiCheatReloaded check
|
||||
* Will be replaced in ACR 2.0.0
|
||||
*/
|
||||
|
||||
@Deprecated
|
||||
public class CheckFailEvent extends Event {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@@ -57,8 +57,8 @@ public class BadPacketsCheck {
|
||||
double tps = AntiCheatReloaded.getPlugin().getTPS();
|
||||
MovementManager movementManager = AntiCheatReloaded.getManager().getUserManager().getUser(player.getUniqueId())
|
||||
.getMovementManager();
|
||||
if (user.isLagging() || tps < checksConfig.getDouble(CheckType.MOREPACKETS, "minimumTps")
|
||||
|| (System.currentTimeMillis() - movementManager.lastTeleport <= 150))
|
||||
if (user.isLagging() || tps < checksConfig.getDouble(CheckType.BADPACKETS, "minimumTps")
|
||||
|| (System.currentTimeMillis() - movementManager.lastTeleport <= checksConfig.getInteger(CheckType.BADPACKETS, "teleportCompensation")))
|
||||
return;
|
||||
|
||||
double x = packet.getDoubles().read(0);
|
||||
|
||||
Reference in new issue
Block a user