use of cc.hyperium.utils.JsonHolder 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;
}
use of cc.hyperium.utils.JsonHolder 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;
}
use of cc.hyperium.utils.JsonHolder 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;
}
use of cc.hyperium.utils.JsonHolder 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;
}
use of cc.hyperium.utils.JsonHolder in project Hyperium by HyperiumClient.
the class TPoseKeybind method onRelease.
@Override
public void onRelease() {
if (!Settings.TPOSE_TOGGLE_MODE)
tPoseToggled = false;
if (Settings.TPOSE_TOGGLE || Settings.TPOSE_TOGGLE_MODE)
return;
Hyperium.INSTANCE.getHandlers().getTPoseHandler().stopAnimation(UUIDUtil.getClientUUID());
NettyClient client = NettyClient.getClient();
if (client != null) {
client.write(ServerCrossDataPacket.build(new JsonHolder().put("type", "tpose_update").put("posing", false)));
}
}
Aggregations