Folia icon indicating copy to clipboard operation
Folia copied to clipboard

API: Location Tick Times

Open sofianedjerbi opened this issue 2 years ago • 1 comments

Is your feature request related to a problem?

As a regionised server software, we don't know what current API Bukkit#getTickTimes, Bukkit#getAverageTickTime and Bukkit#getTPS should return. It might be great to get significative TPS info based on region tick times.

Describe the solution you'd like.

Deprecate Bukkit#getTickTimes and Server#getTickTimes Deprecate Bukkit#getAverageTickTime and Server#getAverageTickTime Deprecate Bukkit#getTPS and Server#getTPS Add Bukkit.getTickTimes(@NotNull Location): Give Tick Times based on Location Region Tick Times

Describe alternatives you've considered.

Bukkit.getTickTimes(@NotNull Entity): Give Tick Times based on Entity Region Tick Times Same with getTPS getAverageTickTimes.

Other

No response

sofianedjerbi avatar Apr 02 '23 22:04 sofianedjerbi

The region at any location is undefined unless owned by the current thread. The region which owns an entity is even less-defined, too. These issues make the suggested APIs generally undefined - how do they play in with things such as region transience?

Basically, need APIs that ones that delay a return value when the region state is considered valid.

Spottedleaf avatar Apr 17 '23 01:04 Spottedleaf