Updated-NoCheatPlus / NoCheatPlus

Anti-cheating plugin for Minecraft (1.5-1.20, Bukkit/Spigot)
https://ci.codemc.io/job/Updated-NoCheatPlus/job/Updated-NoCheatPlus/
GNU General Public License v3.0
482 stars 100 forks source link

Unify frequency checks #151

Closed Lysandr0 closed 1 year ago

Lysandr0 commented 3 years ago

To keep a better config readability (possibly even code readability) we should unify some frequency checks into one. Mainly thinking of PacketFrequency-FlyingFrequency-MorePackets-KeepAliveFrequency, however a merge of Fight.Speed and AttackFrequencyshould be considered too (Or simply drop one check and keep the other).

Further: we could also use the NetStatic checking method for flyingfrequency. As stated in a comment left by asofold: https://github.com/Updated-NoCheatPlus/NoCheatPlus/blob/0951915aa19480eb10d0fc1c489b4b5b1474bfd7/NCPCompatProtocolLib/src/main/java/fr/neatmonster/nocheatplus/checks/net/protocollib/MovingFlying.java#L343

Random idea/impression, need to elaborate. :)