use of cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem in project Hyperium by HyperiumClient.
the class ArenaStats method getPreview.
@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
ArrayList<StatsDisplayItem> items = new ArrayList<>();
JsonHolder arena = player.getStats(GameType.ARENA);
items.add(new DisplayLine(bold("Coins: ", arena.optInt("coins"))));
int kills = arena.optInt("kills_1v1") + arena.optInt("kills_2v2") + arena.optInt("kills_4v4");
items.add(new DisplayLine(bold("Kills: ", kills), Color.WHITE.getRGB()));
int deaths = arena.optInt("deaths_1v1") + arena.optInt("deaths_2v2") + arena.optInt("deaths_4v4");
items.add(new DisplayLine(bold("Deaths: ", deaths), Color.WHITE.getRGB()));
int wins = arena.optInt("wins_1v1") + arena.optInt("wins_2v2") + arena.optInt("wins_4v4");
items.add(new DisplayLine(bold("Wins: ", wins), Color.WHITE.getRGB()));
int losses = arena.optInt("losses_1v1") + arena.optInt("losses_2v2") + arena.optInt("losses_4v4");
items.add(new DisplayLine(bold("Losses: ", losses), Color.WHITE.getRGB()));
items.add(new DisplayLine(bold("K/D: ", WebsiteUtils.buildRatio(kills, deaths)), Color.WHITE.getRGB()));
items.add(new DisplayLine(bold("W/L: ", WebsiteUtils.buildRatio(wins, losses)), Color.WHITE.getRGB()));
return items;
}
use of cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem in project Hyperium by HyperiumClient.
the class ArenaStats method getDeepStats.
@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
List<StatsDisplayItem> items = getPreview(player);
items.add(new DisplayLine(""));
List<String[]> tableItems = new ArrayList<>();
JsonHolder arena = player.getStats(GameType.ARENA);
tableItems.add(new String[] { "Mode", "Kills", "Deaths", "Wins", "Losses", "Healed", "K/D", "W/L" });
String[] names = new String[] { "1v1", "2v2", "4v4" };
for (String name : names) {
tableItems.add(new String[] { name, WebsiteUtils.comma(arena.optInt("kills_" + name)), WebsiteUtils.comma(arena.optInt("deaths_" + name)), WebsiteUtils.comma(arena.optInt("wins_" + name)), WebsiteUtils.comma(arena.optInt("losses_" + name)), WebsiteUtils.comma(arena.optInt("healed_" + name)), WebsiteUtils.buildRatio(arena.optInt("kills_" + name), arena.optInt("deaths_" + name)), WebsiteUtils.buildRatio(arena.optInt("wins_" + name), arena.optInt("losses_" + name)) });
}
items.add(new DisplayTable(tableItems));
return items;
}
use of cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem in project Hyperium by HyperiumClient.
the class BlitzStats method getDeepStats.
@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
List<StatsDisplayItem> preview = getPreview(player);
preview.add(new DisplayLine(""));
List<String[]> lines = new ArrayList<>();
lines.add(new String[] { "Kit", "Level" });
JsonHolder blitz = player.getStats(GameType.SURVIVAL_GAMES);
for (String st : WebsiteUtils.blitz_kits) {
String tmp1 = null;
if (!st.contains("Hype")) {
tmp1 = st.replace(" ", "").toLowerCase();
} else {
tmp1 = st.toLowerCase();
}
if (blitz.has(tmp1))
lines.add(new String[] { st, WebsiteUtils.numeral(blitz.optInt(tmp1) + 1) });
}
preview.add(new DisplayTable(lines));
return preview;
}
use of cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem in project Hyperium by HyperiumClient.
the class DuelsStats method getPreview.
@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
List<StatsDisplayItem> preview = super.getPreview(player);
preview.add(new DisplayLine(""));
JsonHolder stats = player.getStats(GameType.DUELS);
preview.add(new DisplayLine(bold("Tournament Wins: ", Arrays.stream(tournaments).mapToInt(tournament -> stats.optInt(tournament + "_wins")).sum())));
return preview;
}
use of cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem in project Hyperium by HyperiumClient.
the class MegaWallsStats method getPreview.
@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
List<StatsDisplayItem> stats = new ArrayList<>();
JsonHolder megaWalls = player.getStats(GameType.WALLS3);
stats.add(new DisplayLine(bold("Coins: ", megaWalls.optInt("coins"))));
stats.add(new DisplayLine(bold("Kills: ", megaWalls.optInt("kills"))));
stats.add(new DisplayLine(bold("Deaths: ", megaWalls.optInt("deaths"))));
stats.add(new DisplayLine(bold("Wins: ", megaWalls.optInt("wins"))));
stats.add(new DisplayLine(bold("Losses: ", megaWalls.optInt("losses"))));
return stats;
}
Aggregations