Added new Aim check and utils

- Fixed TickTimer not functioning
- Fixed generalCancel always cancelling
- Removed debug from places that I am not currently in need of debugging
- Attempting to fix login error when reloading when injecting packethandler
- Added sensitivity to playerInfo command
- Fixed runaway buffer fp on Fly (A)
This commit is contained in:
Dawson
2022-08-11 13:25:57 -04:00
parent 234744e98d
commit f75657744a
12 changed files with 684 additions and 31 deletions
@@ -19,6 +19,8 @@ import dev.brighten.ac.packet.handler.HandlerAbstract;
import dev.brighten.ac.utils.Tuple;
import dev.brighten.ac.utils.reflections.impl.MinecraftReflection;
import dev.brighten.ac.utils.reflections.types.WrappedMethod;
import dev.brighten.ac.utils.timer.Timer;
import dev.brighten.ac.utils.timer.impl.MillisTimer;
import lombok.Getter;
import lombok.Setter;
import lombok.val;
@@ -52,6 +54,8 @@ public class APlayer {
@Getter
private int playerTick;
@Getter
private Timer creation = new MillisTimer();
@Getter
//TODO Actually grab real player version once finished implementing version grabber from Atlas
private ProtocolVersion playerVersion = ProtocolVersion.UNKNOWN;
@Getter
@@ -87,9 +91,11 @@ public class APlayer {
this.lagInfo = new LagInformation();
this.blockInformation = new BlockInformation(this);
// Grabbing the protocol version of the player.
Anticheat.INSTANCE.getScheduler().execute(() ->
playerVersion = ProtocolVersion.getVersion(ProtocolAPI.INSTANCE.getPlayerVersion(getBukkitPlayer())));
// Enabling alerts for players on join if they have the permissions to
if(getBukkitPlayer().hasPermission("anticheat.command.alerts")
|| getBukkitPlayer().hasPermission("anticheat.alerts")) {
Check.alertsEnabled.add(getUuid());