Search in sources :

Example 6 with DisplayLine

use of cc.hyperium.handlers.handlers.stats.display.DisplayLine in project Hyperium by HyperiumClient.

the class WallsStats method getDeepStats.

@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
    List<StatsDisplayItem> stats = getPreview(player);
    JsonHolder walls = player.getStats(GameType.WALLS);
    stats.add(new DisplayLine(bold("K/D: ", WebsiteUtils.buildRatio(walls.optInt("kills"), walls.optInt("deaths")))));
    stats.add(new DisplayLine(bold("W/L: ", WebsiteUtils.buildRatio(walls.optInt("wins"), walls.optInt("losses")))));
    return stats;
}
Also used : JsonHolder(cc.hyperium.utils.JsonHolder) DisplayLine(cc.hyperium.handlers.handlers.stats.display.DisplayLine) StatsDisplayItem(cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem)

Example 7 with DisplayLine

use of cc.hyperium.handlers.handlers.stats.display.DisplayLine in project Hyperium by HyperiumClient.

the class WallsStats method getPreview.

@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
    List<StatsDisplayItem> stats = new ArrayList<>();
    JsonHolder walls = player.getStats(GameType.WALLS);
    stats.add(new DisplayLine(bold("Coins: ", walls.optInt("coins"))));
    stats.add(new DisplayLine(bold("Kills: ", walls.optInt("kills"))));
    stats.add(new DisplayLine(bold("Deaths: ", walls.optInt("deaths"))));
    stats.add(new DisplayLine(bold("Wins: ", walls.optInt("wins"))));
    stats.add(new DisplayLine(bold("Losses: ", walls.optInt("losses"))));
    return stats;
}
Also used : JsonHolder(cc.hyperium.utils.JsonHolder) DisplayLine(cc.hyperium.handlers.handlers.stats.display.DisplayLine) StatsDisplayItem(cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem) ArrayList(java.util.ArrayList)

Example 8 with DisplayLine

use of cc.hyperium.handlers.handlers.stats.display.DisplayLine in project Hyperium by HyperiumClient.

the class CVCStats method getDeepStats.

@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
    List<StatsDisplayItem> preview = getPreview(player);
    JsonHolder stats = player.getStats(GameType.MCGO);
    preview.add(new DisplayLine(""));
    preview.add(new DisplayLine(bold("Bombs Planted: ", stats.optInt("bombs_planted")), Color.WHITE.getRGB()));
    preview.add(new DisplayLine(bold("Bombs Defused: ", stats.optInt("bombs_defused")), Color.WHITE.getRGB()));
    preview.add(new DisplayLine(bold("Round Wins: ", stats.optInt("round_wins")), Color.WHITE.getRGB()));
    preview.add(new DisplayLine(bold("Shots Fired: ", stats.optInt("shots_fired")), Color.WHITE.getRGB()));
    return preview;
}
Also used : JsonHolder(cc.hyperium.utils.JsonHolder) DisplayLine(cc.hyperium.handlers.handlers.stats.display.DisplayLine) StatsDisplayItem(cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem)

Example 9 with DisplayLine

use of cc.hyperium.handlers.handlers.stats.display.DisplayLine 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;
}
Also used : JsonHolder(cc.hyperium.utils.JsonHolder) DisplayLine(cc.hyperium.handlers.handlers.stats.display.DisplayLine) StatsDisplayItem(cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem) ArrayList(java.util.ArrayList)

Example 10 with DisplayLine

use of cc.hyperium.handlers.handlers.stats.display.DisplayLine 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;
}
Also used : JsonHolder(cc.hyperium.utils.JsonHolder) DisplayLine(cc.hyperium.handlers.handlers.stats.display.DisplayLine) DisplayTable(cc.hyperium.handlers.handlers.stats.display.DisplayTable) StatsDisplayItem(cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem) ArrayList(java.util.ArrayList)

Aggregations

DisplayLine (cc.hyperium.handlers.handlers.stats.display.DisplayLine)44 StatsDisplayItem (cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem)43 JsonHolder (cc.hyperium.utils.JsonHolder)42 ArrayList (java.util.ArrayList)32 DisplayTable (cc.hyperium.handlers.handlers.stats.display.DisplayTable)10 SimpleDateFormat (java.text.SimpleDateFormat)2 Date (java.util.Date)2 Pet (club.sk1er.website.Pet)1 JsonArray (com.google.gson.JsonArray)1 JsonElement (com.google.gson.JsonElement)1 GameType (net.hypixel.api.GameType)1