-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
Latest / N/A
-
Yes
There is no easy way to get the server's TPS without calculating it yourself (ew) or using reflection (meh).
A method such as Server#getTPS() should be implemented, along with Server#getRecentTPS().
The first would return the current TPS and the latter would return an array of the 3 values shown by the /tps command.
I have opted to create one method—getTPS. It is just the array with the recent TPS values. This is to ensure compatibility downstream with Paper and because it's simpler.