LunaChat v3.0.3 : Added bStats custom chart. Related #175

このコミットが含まれているのは:
ucchy committed 2020-07-04 01:46:37 +09:00
1 親 b3ed3103e4
コミット d14840f144
2ファイル変更
+27 -2

検索条件に一致するファイルはありません

+13 -1
ファイルの表示
@@ -7,8 +7,10 @@ package com.github.ucchyocean.lc3;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import org.bstats.bungeecord.Metrics;
@@ -55,7 +57,17 @@ public class LunaChatBungee extends Plugin implements PluginInterface {
LunaChat.setMode(LunaChatMode.BUNGEE);
// Metrics
new Metrics(this, 7936);
Metrics metrics = new Metrics(this, 7936);
metrics.addCustomChart(new Metrics.DrilldownPie(
"minecraft_server_version", new Callable<Map<String, Map<String, Integer>>>() {
public Map<String, Map<String, Integer>> call() throws Exception {
Map<String, Map<String, Integer>> map = new HashMap<>();
Map<String, Integer> sub = new HashMap<>();
sub.put(getProxy().getVersion(), 1);
map.put(getProxy().getName(), sub);
return map;
}
}));
// 初期化
config = new LunaChatConfig(getDataFolder(), getFile());