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