TechzoneMC / SpawnShield

Prevent players from entering a safezone in combat
MIT License
7 stars 1 forks source link

playerEntity.setVelocity() issues #11

Open L4BORG opened 8 years ago

L4BORG commented 8 years ago

https://github.com/TechzoneMC/SpawnShield/blob/3e9a56e8e420a228a248f95586cabb09eb279feb/base/src/main/java/net/techcable/spawnshield/tasks/KnockbackTask.java#L50

playerEntity.setVelocity(knockback);

I would like to point out the fact that packets sent because of "setVelocity()" will have no effects whatsoever on hacked clients that have antiknockback, like nothing happened (tested with Wurst).

And some plugins such as NCP have no "antiknockback" check.

Maybe add warning about this or something... there isn't much that can be done about this, except maybe check if player really moved etc but that would prob. be too expensive (PlayerMoveEvent or task every few ticks).

Just a thought :)

Techcable commented 8 years ago

I could teleport them if they get too far in (like how teleport mode does) :smile: This would require calculating distance and whatnot, but it should work well.