funkemunky

Untitled

Jun 29th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.31 KB | None | 0 0
  1. package cc.funkemunky.anticheat.impl.checks.combat.aimassist;
  2.  
  3. import cc.funkemunky.anticheat.api.checks.*;
  4. import cc.funkemunky.anticheat.api.utils.Packets;
  5. import cc.funkemunky.anticheat.api.utils.Verbose;
  6. import cc.funkemunky.api.tinyprotocol.api.Packet;
  7. import cc.funkemunky.api.utils.Init;
  8. import lombok.val;
  9. import org.bukkit.event.Event;
  10.  
  11. @CheckInfo(name = "Aim (Type I)", description = "Looks for rounded rotational values", type = CheckType.AIM, cancelType = CancelType.MOTION, executable = false)
  12. @Init
  13. @Packets(packets = {Packet.Client.POSITION_LOOK, Packet.Client.LOOK})
  14. public class AimI extends Check {
  15.  
  16.     private Verbose verbose = new Verbose();
  17.  
  18.     @Override
  19.     public void onPacket(Object packet, String packetType, long timeStamp) {
  20.         val move = getData().getMovementProcessor();
  21.  
  22.         if (getData().isServerPos()) return;
  23.  
  24.         if (move.getYawDelta() > 0.1 && (move.getYawDelta() % 0.5 == 0 || move.getTo().getYaw() % 1 == 0)) {
  25.             if (verbose.flag(9, 500L)) {
  26.                 flag("YD: " + move.getYawDelta() + " YAW: " + move.getTo().getYaw(), true, true, AlertTier.HIGH);
  27.             }
  28.         }
  29.  
  30.         debug("yawDelta=" + move.getYawDelta() + " yaw=" + move.getTo().getYaw());
  31.     }
  32.  
  33.     @Override
  34.     public void onBukkitEvent(Event event) {
  35.  
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment