gravitylow / AntiCheat

AntiCheat - Discontinued 9/7/2014
http://dev.bukkit.org/bukkit-plugins/anticheat/
GNU General Public License v3.0
33 stars 72 forks source link

Aimbot still working #258

Open john01dav opened 10 years ago

john01dav commented 10 years ago

Hello, when I was testing this plugin for my mini-games server I noticed that nodus aimbot still works even with the pluign installed. Even if the player with nodus is 100+ blocks away and facing the complete opposite direction of the arrow target.

EDIT: Couldn't this be done with a simple raycast the distance between the target and then checking the distance and if the distance is too long than there is a hacker?

gravitylow commented 10 years ago

I don't use NMS in AntiCheat, it's API-only. In addition to this, the solution you have proposed would only determine whether someone is too far away from a player when they attack them. That description matches a longreach hack, not an aimbot.

john01dav commented 10 years ago

I do not belive that you understand what I am trying to say, I will attempt to simplify it in a step by step process to be executed in the EntityDamagedByEntityEvent 1) check if the damager isntanceof Player if not then return 2) check if the cause of damage is arrows 3) determine the distance between the damaged entity and the attacker 4) using your own raycast formula (possibly pulled from bukkit source, but located within your own code so it does not rely on nms) draw a ray (technically line) from the player's head direction. the length of this line is the distance calculated in step 3 5) determine the closes point on the line to the damaged entity 6) calculate the distance between the damaged entity and the point from step 5 7) if the distance calculated in step 6 is too far away (calculated based on how far away the target is from the attacker (calculated in step 3)) then you have a hacker