Search in sources :

Example 41 with StatsDisplayItem

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

the class SmashHeroesStats method getPreview.

@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
    List<StatsDisplayItem> stats = new ArrayList<>();
    JsonHolder smashHeroes = player.getStats(GameType.SUPER_SMASH);
    stats.add(new DisplayLine(bold("Coins: ", smashHeroes.optInt("coins"))));
    stats.add(new DisplayLine(bold("Kills: ", smashHeroes.optInt("kills"))));
    stats.add(new DisplayLine(bold("Deaths: ", smashHeroes.optInt("deaths"))));
    stats.add(new DisplayLine(bold("Wins: ", smashHeroes.optInt("wins"))));
    stats.add(new DisplayLine(bold("Losses: ", smashHeroes.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 42 with StatsDisplayItem

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

the class TKRStats method getPreview.

@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
    List<StatsDisplayItem> stats = new ArrayList<>();
    JsonHolder gingerBread = player.getStats(GameType.GINGERBREAD);
    stats.add(new DisplayLine(bold("Coins: ", gingerBread.optInt("coins"))));
    stats.add(new DisplayLine(bold("Gold Trophies: ", gingerBread.optInt("gold_trophy"))));
    stats.add(new DisplayLine(bold("Silver Trophies: ", gingerBread.optInt("silver_trophy"))));
    stats.add(new DisplayLine(bold("Bronze Trophies: ", gingerBread.optInt("bronze_trophy"))));
    stats.add(new DisplayLine(bold("Laps Completed: ", gingerBread.optInt("laps_completed"))));
    stats.add(new DisplayLine(bold("Coins Picked Up: ", gingerBread.optInt("coins_picked_up"))));
    stats.add(new DisplayLine(bold("Power Ups Picked Up: ", gingerBread.optInt("box_pickups"))));
    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 43 with StatsDisplayItem

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

the class UHCStats method getPreview.

@Override
public List<StatsDisplayItem> getPreview(HypixelApiPlayer player) {
    List<StatsDisplayItem> stats = new ArrayList<>();
    JsonHolder UHC = player.getStats(GameType.UHC);
    stats.add(new DisplayLine(bold("Coins: ", UHC.optInt("coins"))));
    stats.add(new DisplayLine(bold("Score: ", UHC.optInt("score"))));
    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 44 with StatsDisplayItem

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

the class VampireZStats method getDeepStats.

@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
    List<StatsDisplayItem> stats = getPreview(player);
    JsonHolder vampireZ = player.getStats(GameType.VAMPIREZ);
    stats.add(new DisplayLine(bold("Human Wins: ", vampireZ.optInt("human_wins"))));
    stats.add(new DisplayLine(bold("Human Kills: ", vampireZ.optInt("human_kills"))));
    stats.add(new DisplayLine(bold("Human Deaths: ", vampireZ.optInt("human_deaths"))));
    stats.add(new DisplayLine(bold("Zombie Kills: ", vampireZ.optInt("zombie_kills"))));
    stats.add(new DisplayLine(bold("Vampire Kills: ", vampireZ.optInt("vampire_kills"))));
    stats.add(new DisplayLine(bold("Vampire wins: ", vampireZ.optInt("vampire_wins"))));
    stats.add(new DisplayLine(bold("Vampire Deaths: ", vampireZ.optInt("vampire_deaths"))));
    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 45 with StatsDisplayItem

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

the class SkyClashStats method getDeepStats.

@Override
public List<StatsDisplayItem> getDeepStats(HypixelApiPlayer player) {
    List<StatsDisplayItem> stats = getPreview(player);
    JsonHolder skyClash = player.getStats(GameType.SKYCLASH);
    stats.add(new DisplayLine(bold("Assists: ", skyClash.optInt("assists"))));
    stats.add(new DisplayLine(bold("K/D: ", WebsiteUtils.buildRatio(skyClash.optInt("kills"), skyClash.optInt("deaths")))));
    stats.add(new DisplayLine(bold("W/L: ", WebsiteUtils.buildRatio(skyClash.optInt("wins"), skyClash.optInt("losses")))));
    stats.add(new DisplayLine(""));
    stats.add(new DisplayLine(""));
    stats.add(new DisplayLine(bold("Mobs Spawned: ", skyClash.optInt("mobs_spawned"))));
    stats.add(new DisplayLine(""));
    List<String[]> lines = new ArrayList<>();
    lines.add(new String[] { "Mode", "Fastest Win", "Kills", "Wins", "Losses", "Deaths" });
    String[] SKYCLASH_MODES = { "Solo", "Doubles", "Team War" };
    for (String front : SKYCLASH_MODES) {
        String b = front.toLowerCase().replace(" ", "_");
        lines.add(new String[] { front, String.valueOf(skyClash.optInt("fastest_win_" + b)), String.valueOf(skyClash.optInt("kills_" + b)), String.valueOf(skyClash.optInt("wins_" + b)), String.valueOf(skyClash.optInt("losses_" + b)), String.valueOf(skyClash.optInt("deaths_" + b)) });
    }
    stats.add(new DisplayTable(lines));
    return stats;
}
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

StatsDisplayItem (cc.hyperium.handlers.handlers.stats.display.StatsDisplayItem)45 DisplayLine (cc.hyperium.handlers.handlers.stats.display.DisplayLine)43 JsonHolder (cc.hyperium.utils.JsonHolder)42 ArrayList (java.util.ArrayList)33 DisplayTable (cc.hyperium.handlers.handlers.stats.display.DisplayTable)10 SimpleDateFormat (java.text.SimpleDateFormat)2 Date (java.util.Date)2 GuiBlock (cc.hyperium.gui.GuiBlock)1 Pet (club.sk1er.website.Pet)1 HypixelApiGuild (club.sk1er.website.api.requests.HypixelApiGuild)1 ExecutionException (java.util.concurrent.ExecutionException)1 GameType (net.hypixel.api.GameType)1 ScaledResolution (net.minecraft.client.gui.ScaledResolution)1 DynamicTexture (net.minecraft.client.renderer.texture.DynamicTexture)1