Closed jegt closed 2 years ago
@jegt can you add a description to the PR? What problem does this solve, why is it better than the existing Lag()
code etc. Thank you!
@phybros Added a description. Hope this is clearer.
This PR would alienate any non-Paper users... hard pass from me. While Paper is certainly popular, not everyone who runs a Bukkit API-compatible server will be running a Paper one.
The old Lag
code needs to stay in place as a fallback.
I can understand that you want to keep it backward compatible. I'm not sure exactly how to make it compatible with non Paper servers since I need to specify the new Paper API in pom.xml. Its been 10+ years since I did any Java coding =)
Doesn't spigot also have a TPS API?
@matteoturini No it seems to only be available for Paper.
Just looked it up, and you can use NMS and Reflection to get the TPS. Seems better than Paper API.
Unfortunately I don't have the time to do that. I guess I will just have to maintain this branch for my own use.
Uses the existing TPS data from org.bukkit.Bukkit which includes 1m, 5m and 15m (instead of just 1m) and also average MS per tick. Probably better to use the existing implementation for this than implementing it again in Lag(). I also moved these metrics to ServerHealth instead of Server.