Open Symmettry opened 6 months ago
Feature description
I've noticed that for stuff like BadPacketsM, they exempt 1.7, but they are still being added to packet listeners.
Since the version won't change (until ofc they rejoin, but that creates a new grimplayer class anyway), then it should just straight up not add BadPacketsM to the player listeners entirely, because it will just waste resources calling the function and checking stuff.
Instead of not adding it, we could probably just not call the packet listeners if the player is exempt, or the check isn't enabled (experimental).
A possible way we could do this is having an isEnabled function, which by default returns true. We should have the experimental check elsewhere, so it isn't overwritten when the function is implemented in checks.
Not adding it will do the same thing and improve performance more, as no checks will have to be implemented for checking if it's enabled & no memory is wasted with the extra class being made.
If the config is reloaded, it can just add the experimental checks to online players, which should work just fine. (assuming we're not going to add experimental checks when it's disabled at the time the player joins)
duplicate of #830 btw
Если не добавлять его, это приведет к тому же и еще больше повысит производительность, поскольку не нужно будет реализовывать проверки, включено ли оно, и память не будет потрачена впустую при создании дополнительного класса.
Если конфигурация перезагружена, она может просто добавить экспериментальные проверки онлайн-игрокам, что должно работать просто отлично. (предполагая, что мы не собираемся добавлять экспериментальные проверки, когда они отключены на момент присоединения игрока)
You can change all in grim.Its is open src project.You can create fork and change used checks.Its easy.
Not adding it will do the same thing and improve performance more, as no checks will have to be implemented for checking if it's enabled & no memory is wasted with the extra class being made. If the config is reloaded, it can just add the experimental checks to online players, which should work just fine. (assuming we're not going to add experimental checks when it's disabled at the time the player joins)
You can change all in grim.Its is open src project.You can create fork and change used checks.Its easy.
Sure, go do that.
Feature description
I've noticed that for stuff like BadPacketsM, they exempt 1.7, but they are still being added to packet listeners.
Since the version won't change (until ofc they rejoin, but that creates a new grimplayer class anyway), then it should just straight up not add BadPacketsM to the player listeners entirely, because it will just waste resources calling the function and checking stuff.