Folia
Folia copied to clipboard
Expanded TPS API to support MSPT
This PR includes methods to get MSPT per region. I tried using the same naming as in Bukkit but adapted for the region logic like the TPS API was.
This re-uses the same logic as CraftServer#getTPSFromRegion and javadocs, which means a possible improvement would be to make a separate function to get the RegionScheduleHandle to re-use in both. However, I decided against this approach since idk if that would make it less likely of getting merged.
This API is useful for monitoring tools that take samples in regular intervals.