mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-12 06:48:50 +02: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