!Java 8 format

This commit is contained in:
Indyuce 2019-10-21 12:30:53 +02:00
parent eb20aa2230
commit 4187c19f99

View File

@ -1,21 +1,16 @@
package net.Indyuce.mmoitems.comp;
import java.util.concurrent.Callable;
import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.Type;
public class MMOItemsMetrics extends Metrics {
public MMOItemsMetrics() {
super(MMOItems.plugin);
addCustomChart(new Metrics.SingleLineChart("items", new Callable<Integer>() {
@Override
public Integer call() throws Exception {
addCustomChart(new Metrics.SingleLineChart("items", () -> {
int total = 0;
for (Type type : MMOItems.plugin.getTypes().getAll())
total += type.getConfigFile().getConfig().getKeys(false).size();
return total;
}
}));
}
}