mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fix MB conversion at RAM usage
This commit is contained in:
parent
0359faf694
commit
c6d4444bd6
@ -25,7 +25,8 @@ public class ServerVariableHolder {
|
||||
ip = server.getIp();
|
||||
|
||||
String serverName = server.getName();
|
||||
usingPaper = serverName.equals("Paper") || serverName.equals("TacoSpigot");
|
||||
usingPaper = serverName.equals("Paper")
|
||||
|| serverName.equals("TacoSpigot"); //Fork of Paper
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,8 +75,8 @@ public class TPSCountTimer extends AbsRunnable {
|
||||
|
||||
Runtime runtime = Runtime.getRuntime();
|
||||
|
||||
long totalMemory = runtime.totalMemory() / 1024L;
|
||||
long usedMemory = totalMemory - runtime.freeMemory() / 1024L;
|
||||
long totalMemory = runtime.totalMemory();
|
||||
long usedMemory = (totalMemory - runtime.freeMemory()) / (1024L * 1024L);
|
||||
|
||||
int playersOnline = plugin.getServer().getOnlinePlayers().size();
|
||||
int loadedChunks = getLoadedChunks();
|
||||
|
Loading…
Reference in New Issue
Block a user