use of cc.hyperium.handlers.handlers.stats.display.DisplayLine 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.handlers.handlers.stats.display.DisplayLine 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.handlers.handlers.stats.display.DisplayLine 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;
}
use of cc.hyperium.handlers.handlers.stats.display.DisplayLine in project Hyperium by HyperiumClient.
the class QuakecraftStats method getPreview.
@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
List<StatsDisplayItem> stats = new ArrayList<>();
JsonHolder quakeCraft = player.getStats(GameType.QUAKECRAFT);
stats.add(new DisplayLine(bold("Coins: ", quakeCraft.optInt("coins"))));
stats.add(new DisplayLine(bold("Highest Killstreak: ", quakeCraft.optInt("highest_killstreak"))));
stats.add(new DisplayLine(bold("Dash Power: ", Integer.valueOf(quakeCraft.has("dash_power") ? quakeCraft.optString("dash_power") : "0") + 1)));
stats.add(new DisplayLine(bold("Dash Cooldown: ", Integer.valueOf(quakeCraft.has("dash_cooldown") ? quakeCraft.optString("dash_cooldown") : "0") + 1)));
return stats;
}
use of cc.hyperium.handlers.handlers.stats.display.DisplayLine in project Hyperium by HyperiumClient.
the class SkyWarsStats method getDeepStats.
@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
List<StatsDisplayItem> stats = getPreview(player);
JsonHolder skyWars = player.getStats(GameType.SKYWARS);
SimpleDateFormat hhmmss = new SimpleDateFormat("HH:mm:ss");
stats.add(new DisplayLine(""));
stats.add(new DisplayLine(bold("K/D: ", WebsiteUtils.buildRatio(skyWars.optInt("kills"), skyWars.optInt("deaths")))));
stats.add(new DisplayLine(bold("W/L: ", WebsiteUtils.buildRatio(skyWars.optInt("wins"), skyWars.optInt("losses")))));
stats.add(new DisplayLine(""));
stats.add(new DisplayLine(bold("Total Souls: ", skyWars.optInt("souls"))));
stats.add(new DisplayLine(bold("Soul Well Usages: ", skyWars.optInt("soul_well"))));
stats.add(new DisplayLine(bold("Soul Well Legendaries: ", skyWars.optInt("soul_well_legendaries"))));
stats.add(new DisplayLine(bold("Soul Well Rares: ", skyWars.optInt("soul_well_rares"))));
stats.add(new DisplayLine(bold("Souls Gathered: ", skyWars.optInt("souls_gathered"))));
stats.add(new DisplayLine(bold("Souls Purchased: ", skyWars.optInt("paid_souls"))));
int skywars_time_played = skyWars.optInt("time_played");
int skywars_tmp_days = 0;
// SKYWARS_TIME
while (skywars_time_played > 24 * 60 * 60) {
skywars_tmp_days++;
skywars_time_played -= 24 * 60 * 60;
}
stats.add(new DisplayLine(""));
stats.add(new DisplayLine(bold("Time played: (DD, HH:MM:SS): ", skywars_tmp_days + ", " + hhmmss.format(new Date(1000 * skywars_time_played)))));
stats.add(new DisplayLine(""));
stats.add(new DisplayLine(""));
final String[] skywars_modes = { "Ranked", "Solo Normal", "Solo Insane", "Team Normal", "Team Insane", "Mega" };
List<String[]> lines = new ArrayList<>();
lines.add(new String[] { "Mode", "Kills", "Wins", "Deaths", "Losses", "K/D", "W/L" });
for (String front : skywars_modes) {
String api = front.toLowerCase().replace(" ", "_");
lines.add(new String[] { front, String.valueOf(skyWars.optInt("kills_" + api)), String.valueOf(skyWars.optInt("wins_" + api)), String.valueOf(skyWars.optInt("deaths_" + api)), String.valueOf(skyWars.optInt("losses_" + api)), WebsiteUtils.buildRatio(skyWars.optInt("kills_" + api), skyWars.optInt("deaths_" + api)), WebsiteUtils.buildRatio(skyWars.optInt("wins_" + api), skyWars.optInt("losses_" + api)) });
}
stats.add(new DisplayTable(lines));
return stats;
}
Aggregations