use of cc.hyperium.utils.JsonHolder in project Hyperium by HyperiumClient.
the class CVCStats method getPreview.
@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
JsonHolder stats = player.getStats(GameType.MCGO);
ArrayList<StatsDisplayItem> items = new ArrayList<>();
items.add(new DisplayLine(bold("Coins: ", stats.optInt("coins")), Color.WHITE.getRGB()));
items.add(new DisplayLine(bold("Kills: ", stats.optInt("kills")), Color.WHITE.getRGB()));
items.add(new DisplayLine(bold("Headshots: ", stats.optInt("headshot_kills")), Color.WHITE.getRGB()));
items.add(new DisplayLine(bold("Deaths: ", stats.optInt("deaths")), Color.WHITE.getRGB()));
items.add(new DisplayLine(bold("Wins: ", stats.optInt("game_wins")), Color.WHITE.getRGB()));
items.add(new DisplayLine(bold("Losses: ", stats.optInt("losses")), Color.WHITE.getRGB()));
items.add(new DisplayLine(bold("K/D: ", WebsiteUtils.buildRatio(stats.optInt("kills"), stats.optInt("deaths"))), Color.WHITE.getRGB()));
return items;
}
use of cc.hyperium.utils.JsonHolder in project Hyperium by HyperiumClient.
the class DuelsStats method getDeepStats.
@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
List<StatsDisplayItem> preview = getPreview(player);
JsonHolder stats = player.getStats(GameType.DUELS);
preview.add(new DisplayLine(""));
String[] modes = new String[] { "uhc_duel", "uhc_doubles", "sw_duel", "sw_doubles", "classic_duel", "op_duel", "combo", "mw_duel", "mw_doubles", "blitz_duels", "potion_duel", "sumo_duel" };
String[] names = new String[] { "UHC Solo", "UHC Doubles", "SW Solo", "SW Doubles", "Classic Duel", "OP duel", "Combo", "MegaWalls Solo", "MegaWalls Doubles", "Blitz Solo", "Potion Duel", "Sumo" };
List<String[]> lines = new ArrayList<>();
lines.add(new String[] { "Mode", "Kills", "Wins", "Deaths", "Losses", "K/D", "W/L" });
for (int i = 0; i < tournaments.length; i++) {
String mode = tournaments[i];
lines.add(new String[] { tournament_names[i], WebsiteUtils.comma(stats.optInt(mode + "_kills")), WebsiteUtils.comma(stats.optInt(mode + "_wins")), WebsiteUtils.comma(stats.optInt(mode + "_deaths")), WebsiteUtils.comma(stats.optInt(mode + "_losses")), WebsiteUtils.buildRatio(stats.optInt(mode + "_kills"), stats.optInt(mode + "_deaths")), WebsiteUtils.buildRatio(stats.optInt(mode + "_wins"), stats.optInt(mode + "_losses")) });
}
preview.add(new DisplayTable(lines));
preview.add(new DisplayLine(""));
lines = new ArrayList<>();
lines.add(new String[] { "Mode", "Kills", "Wins", "Deaths", "Losses", "K/D", "W/L", "Best Winstreak" });
for (int i = 0; i < modes.length; i++) {
String mode = modes[i];
lines.add(new String[] { names[i], WebsiteUtils.comma(stats.optInt(mode + "_kills")), WebsiteUtils.comma(stats.optInt(mode + "_wins")), WebsiteUtils.comma(stats.optInt(mode + "_deaths")), WebsiteUtils.comma(stats.optInt(mode + "_losses")), WebsiteUtils.buildRatio(stats.optInt(mode + "_kills"), stats.optInt(mode + "_deaths")), WebsiteUtils.buildRatio(stats.optInt(mode + "_wins"), stats.optInt(mode + "_losses")), WebsiteUtils.comma(stats.optInt("duels_winstreak_best_" + mode)) });
}
preview.add(new DisplayTable(lines));
return preview;
}
use of cc.hyperium.utils.JsonHolder in project Hyperium by HyperiumClient.
the class MegaWallsStats method getDeepStats.
@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
List<StatsDisplayItem> stats = getPreview(player);
JsonHolder megaWalls = player.getStats(GameType.WALLS3);
stats.add(new DisplayLine(""));
stats.add(new DisplayLine(bold("Assists: ", megaWalls.optInt("assists"))));
stats.add(new DisplayLine(bold("Final Kills: ", megaWalls.optInt("finalKills"))));
stats.add(new DisplayLine(bold("Final Assists: ", megaWalls.optInt("finalAssists"))));
stats.add(new DisplayLine(bold("Wither Damage: ", megaWalls.optInt("witherDamage"))));
return stats;
}
use of cc.hyperium.utils.JsonHolder in project Hyperium by HyperiumClient.
the class PaintballStats method getPreview.
@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
List<StatsDisplayItem> stats = new ArrayList<>();
JsonHolder paintball = player.getStats(GameType.PAINTBALL);
stats.add(new DisplayLine(bold("Coins: ", paintball.optInt("kills"))));
stats.add(new DisplayLine(bold("Kills: ", paintball.optInt("kills"))));
stats.add(new DisplayLine(bold("Wins: ", paintball.optInt("wins"))));
stats.add(new DisplayLine(bold("Deaths: ", paintball.optInt("deaths"))));
return stats;
}
use of cc.hyperium.utils.JsonHolder in project Hyperium by HyperiumClient.
the class QuakecraftStats method getDeepStats.
@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
List<StatsDisplayItem> stats = getPreview(player);
JsonHolder quakeCraft = player.getStats(GameType.QUAKECRAFT);
stats.add(new DisplayLine(""));
stats.add(new DisplayLine(""));
List<String[]> lines = new ArrayList<>();
lines.add(new String[] { "Mode", "Kills", "Headshots", "Wins", "Shots Fired", "Blocks Traveled", "Godlikes", "Killstreaks", "K/D" });
lines.add(new String[] { "Overall", String.valueOf(quakeCraft.optInt("kills") + quakeCraft.optInt("kills_teams")), String.valueOf(quakeCraft.optInt("headshots") + quakeCraft.optInt("headshots_teams")), String.valueOf(quakeCraft.optInt("wins") + quakeCraft.optInt("wins_teams")), String.valueOf(quakeCraft.optInt("shots_fired") + quakeCraft.optInt("shots_fired_teams")), String.valueOf(quakeCraft.optInt("distance_travelled") + quakeCraft.optInt("distance_travelled_teams")), String.valueOf(quakeCraft.optInt("godlikes") + quakeCraft.optInt("godlikes_teams")), String.valueOf(quakeCraft.optInt("killstreaks") + quakeCraft.optInt("killstreaks_teams")), WebsiteUtils.buildRatio(quakeCraft.optInt("kills") + quakeCraft.optInt("kills_teams"), quakeCraft.optInt("deaths") + quakeCraft.optInt("deaths_teams")) });
lines.add(new String[] { "Solo", String.valueOf(quakeCraft.optInt("kills")), String.valueOf(quakeCraft.optInt("headshots")), String.valueOf(quakeCraft.optInt("wins")), String.valueOf(quakeCraft.optInt("shots_fired")), String.valueOf(quakeCraft.optInt("distance_travelled")), String.valueOf(quakeCraft.optInt("godlikes")), String.valueOf(quakeCraft.optInt("killstreaks")), WebsiteUtils.buildRatio(quakeCraft.optInt("kills"), quakeCraft.optInt("deaths")) });
lines.add(new String[] { "Teams", String.valueOf(quakeCraft.optInt("kills_teams")), String.valueOf(quakeCraft.optInt("headshots_teams")), String.valueOf(quakeCraft.optInt("wins_teams")), String.valueOf(quakeCraft.optInt("shots_fired_teams")), String.valueOf(quakeCraft.optInt("distance_travelled_teams")), String.valueOf(quakeCraft.optInt("godlikes_teams")), String.valueOf(quakeCraft.optInt("killstreaks_teams")), WebsiteUtils.buildRatio(quakeCraft.optInt("kills_teams"), quakeCraft.optInt("deaths_teams")) });
stats.add(new DisplayTable(lines));
return stats;
}
Aggregations