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

Drop legacy/unused checks #157

Closed Lysandr0 closed 2 years ago

Lysandr0 commented 3 years ago

At this point, we could (and should) further clean NCP from outdated/legacy stuff. Just to have both less code around and less stuff to care about :) Current candidates: 
Inventory.Drop -> Unused. Already covered by FastClick. Dates back to the NoCheat era. Fight.GodMode -> Unused. Another check that dates back to the NoCheat/NeatMonster era. Nowadays it shouldn’t be possible to use such cheats. Do leave a note if otherwise :p Inventory.Items -> Legacy. Inventory.InstantEat -> Legacy. Only keep FastConsume for legacy servers (1.8). Fight.SelfHit: Legacy. Could keep it to prevent bow-flying in < 1.8 servers, however denying a vanilla feature is not optimal, should rather prevent the cheat by other means. Chat.Color: Way too old. Unless you want to strip away colors from players’ messages though an anticheat for some odd reasons (?) Fight.Angle: Virtually unused. See: https://github.com/Updated-NoCheatPlus/NoCheatPlus/blob/ImpossibleHit-WrongPacket/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java#L397 Again, do leave a note if otherwise. Combined.BedLeave: Merge it into SurvivalFly as a subcheck. No reason to have a dedicated check for such. Fight.Speed: Redundancy with AttackFrequency.

Lysandr0 commented 2 years ago

GodMode and SelfHit are going to stay since it seems that 1.5 is having a resurgence among anarchy servers... :) Angle might be useful for later uses. Fight.Speed: If 1.5 servers will gain enough traction, we might need to adapt AttackFrequency to it... [Context: in 1.6.4, something changed in the BukkitAPI, which broke most NCP's combat checks (no detailed explanation was given by asofold). While all other combat checks were repaired, Fight.Speed had to be moved on packet-level to monitor attacking speed]