funkemunky

Aim (Type K)

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