mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-22 16:11:37 +01:00
Using the correct method for getting the variable holder now
This commit is contained in:
parent
8d2b1dbb1c
commit
49584415ca
@ -73,7 +73,7 @@ public class Plan extends BukkitPlugin<Plan> {
|
||||
|
||||
private WebSocketServer uiServer;
|
||||
|
||||
public ServerVariableHolder serverVariableHolder;
|
||||
private ServerVariableHolder serverVariableHolder;
|
||||
private int bootAnalysisTaskID = -1;
|
||||
|
||||
/**
|
||||
|
@ -39,7 +39,7 @@ public class TPSCountTimer extends AbsRunnable {
|
||||
long nanoTime = System.nanoTime();
|
||||
long now = MiscUtils.getTime();
|
||||
long diff = nanoTime - lastCheckNano;
|
||||
on
|
||||
|
||||
lastCheckNano = nanoTime;
|
||||
|
||||
if (diff > nanoTime) { // First run's diff = nanoTime + 1, no calc possible.
|
||||
@ -70,7 +70,7 @@ on
|
||||
|
||||
int playersOnline = plugin.getServer().getOnlinePlayers().size();
|
||||
|
||||
if (plugin.serverVariableHolder.isUsingPaper()) {
|
||||
if (plugin.getVariable().isUsingPaper()) {
|
||||
return getTPSPaper(now, averageCPUUsage, playersOnline);
|
||||
} else {
|
||||
diff -= TimeAmount.MILLISECOND.ns() * 40L; // 40ms removed because the run appears to take 40-50ms, screwing the tps.
|
||||
|
Loading…
Reference in New Issue
Block a user