make this somewhat readable

This commit is contained in:
Minecon724 2022-02-06 18:32:53 +01:00
parent 33e0c32d5e
commit 0aa91add8a
2 changed files with 3 additions and 7 deletions

View File

@ -2,11 +2,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>giants</groupId>
<artifactId>giants</artifactId>
<version>22.2.3</version>
<version>22.2.4</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<repositories>

View File

@ -59,11 +59,7 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor {
@Override
public void onEnable() {
metrics.addCustomChart(new SimplePie("ram_allocation", () -> {
long maxMemory = Runtime.getRuntime().maxMemory();
if (maxMemory == Long.MAX_VALUE) {
return "No limit";
}
return Integer.toString(Math.round(maxMemory/512) * 512);
return Long.toString(Runtime.getRuntime().maxMemory());
}));
if (!(configFile.exists())) {
saveResource("config.yml", false);