endercrest / VoidSpawn

A Spigot & Bukkit plugin that teleports players upon entering the void.
https://www.spigotmc.org/resources/voidspawn.19350/
GNU Lesser General Public License v2.1
5 stars 10 forks source link

vs.enable permission checked continuously #42

Closed SlimeDog closed 6 years ago

SlimeDog commented 6 years ago

Spigot 1.13 latest VoidSpawn 1.17.0

While moving up or down through water (or "bobbing" on the surface), the vs.enable permission is checked every tick. The ocean floor is at Y=46 in the test scenario, nowhere near Y<0. This seems unnecessary.

SlimeDog commented 6 years ago

This is true for water of any kind: ocean, river, pond.

endercrest commented 6 years ago

Thanks for reporting this. I will change this for the next patch. Will move it after the detector check.

SlimeDog commented 6 years ago

If 100 players decided to do this, it would have a negative impact on TPS.

SlimeDog commented 6 years ago

Thanks.

SlimeDog commented 6 years ago

vs.enable also seems to be checked continuously when the player is not in water, just moving around on any surface. Every 2 ticks or so.

SlimeDog commented 6 years ago

It is not clear why the permissions need to be checked at all until a player passes into the void.

endercrest commented 6 years ago

Ya, that is an error on my part. Happened when I did a small refactor.