mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-13 15:20:14 +01:00
Fixed NoClassDefFoundError on PaperSpigot 1.8.X related to TPS (#526)
This commit is contained in:
parent
762ea40794
commit
bb5e0969ca
@ -13,7 +13,12 @@ public class PaperTPSCountTimer extends BukkitTPSCountTimer {
|
||||
|
||||
@Override
|
||||
protected TPS getTPS(long diff, long now, double cpuUsage, long usedMemory, int entityCount, int chunksLoaded, int playersOnline) {
|
||||
double tps = plugin.getServer().getTPS()[0];
|
||||
double tps;
|
||||
try {
|
||||
tps = plugin.getServer().getTPS()[0];
|
||||
} catch (NoSuchMethodError e) {
|
||||
return super.getTPS(diff, now, cpuUsage, usedMemory, entityCount, chunksLoaded, playersOnline);
|
||||
}
|
||||
|
||||
if (tps > 20) {
|
||||
tps = 20;
|
||||
|
Loading…
Reference in New Issue
Block a user