Skip to content

TNT Games

The TNT Games module exposes a single parser, parseTNTGames, which mirrors the raw stats.TNTGames block of the Hypixel player API field-for-field into readonly, fully-typed objects. Every value below is read straight from the raw JSON with no computation, no ratios, and no derived totals.

parseTNTGames

Parses a player's TNT Games stats (stats.TNTGames) into a typed object.

ts
function parseTNTGames(stats: Record<string, unknown>): TNTGamesStats | null;

Null / empty behavior

parseTNTGames returns null when stats.TNTGames is absent, is not an object, or is an array. Otherwise it returns a fully-populated TNTGamesStats object. Missing fields are filled in by the safe readers used throughout the module:

  • Missing or non-number values become 0.
  • Missing or non-string values become "".
  • Boolean fields are true only when the raw value is exactly true, otherwise false.
  • Missing nested objects (flags, privategames, leaderboardSettings, favorites, and the hotbar maps) are treated as empty objects, so every nested block is still present and populated with the defaults above.
  • Date | null fields are null when the raw value is absent or not a positive epoch-ms number.
  • Array fields (packages, favorites.deathEffect, mapVotes, tntRunTournament) become empty arrays ([]) when absent, and non-string / non-matching entries are filtered out.

The dynamic maps (the per-mode hotbars) and the dynamic arrays (mapVotes, tntRunTournament) contain only the entries present in the raw data, so they may be empty when no data exists.


Returned type tree

TNTGamesStats

The root object returned by parseTNTGames.

ts
interface TNTGamesStats {
  readonly coins: number;
  readonly wins: number;
  readonly winstreak: number;
  readonly lastTourneyAd: Date | null;
  readonly activeArrowTrail: string;
  readonly activeDeathEffect: string;
  readonly activeDoubleJump: string;
  readonly activeParticle: string;
  readonly activeParticleEffect: string;
  readonly activeVoidMessage: string;
  readonly doubleJumpEffect: string;
  readonly newActiveDeathEffect: string;
  readonly newActiveParticleEffect: string;
  readonly newDoubleJumpEffect: string;
  readonly newSelectedHat: string;
  readonly selectedHat: string;
  readonly runDoubleJumps: number;
  readonly shopSort: string;
  readonly shopSortEnableOwnedFirst: boolean;
  readonly packages: readonly string[];
  readonly favorites: TNTGamesFavorites;
  readonly mapVotes: readonly TNTGamesMapVote[];
  readonly flags: TNTGamesFlags;
  readonly privateGames: TNTGamesPrivateGames;
  readonly leaderboardSettings: TNTGamesLeaderboardSettings;
  readonly tntRun: TNTGamesTNTRunStats;
  readonly tntRunTournament: readonly TNTGamesTournamentRound[];
  readonly pvpRun: TNTGamesPVPRunStats;
  readonly bowSpleef: TNTGamesBowSpleefStats;
  readonly tntTag: TNTGamesTNTTagStats;
  readonly wizards: TNTGamesWizardsStats;
  readonly tntRunHotbar: Readonly<Record<string, string>>;
  readonly pvpRunHotbar: Readonly<Record<string, string>>;
  readonly bowSpleefHotbar: Readonly<Record<string, string>>;
  readonly tntTagHotbar: Readonly<Record<string, string>>;
  readonly wizardsHotbar: Readonly<Record<string, string>>;
}
FieldRaw sourceNotes
coinscoins / tokensReads coins, falling back to tokens when coins is 0/absent.
winswins
winstreakwinstreak
lastTourneyAdlastTourneyAdEpoch-ms timestamp as Date, or null.
activeArrowTrailactive_arrow_trail
activeDeathEffectactive_death_effect
activeDoubleJumpactive_double_jump
activeParticleactive_particle
activeParticleEffectactive_particle_effect
activeVoidMessageactive_void_message
doubleJumpEffectdouble_jump_effect
newActiveDeathEffectnew_active_death_effect
newActiveParticleEffectnew_active_particle_effect
newDoubleJumpEffectnew_double_jump_effect
newSelectedHatnew_selected_hat
selectedHatselected_hat
runDoubleJumpsnew_run_double_jumps
shopSortshop_sort
shopSortEnableOwnedFirstshop_sort_enable_owned_first
packagespackagesFiltered to string entries.
mapVotesvotes_*Collected from every raw key prefixed votes_; map is the suffix.
tntRunTournamentwins_tourney_tnt_run_<n>Collected from every raw key matching wins_tourney_tnt_run_<n>.
tntRunHotbartntrunSlot → item map, keeping only string values.
pvpRunHotbarpvprunSlot → item map, keeping only string values.
bowSpleefHotbarspleefSlot → item map, keeping only string values.
tntTagHotbartnttagSlot → item map, keeping only string values.
wizardsHotbarwizardsSlot → item map, keeping only string values.

Per-mode stat types

TNTGamesTNTRunStats

ts
interface TNTGamesTNTRunStats {
  readonly wins: number;
  readonly deaths: number;
  readonly bestTime: number;
  readonly doubleJumpTier: number;
  readonly doubleJumps: number;
  readonly doubleJumpsLegacy: number;
  readonly slownessPotions: number;
  readonly speedPotions: number;
  readonly potionsSplashedOnPlayers: number;
  readonly prefix: string;
}
FieldRaw source
winswins_tntrun
deathsdeaths_tntrun
bestTimerecord_tntrun
doubleJumpTierdoublejump_tntrun
doubleJumpsnew_tntrun_double_jumps
doubleJumpsLegacynew_tntrun_double_jumps_legacy
slownessPotionsnew_tntrun_slowness_potions
speedPotionsnew_tntrun_speed_potions
potionsSplashedOnPlayersrun_potions_splashed_on_players
prefixprefix_tntrun

TNTGamesTournamentRound

One entry per wins_tourney_tnt_run_<round> key found in the raw data.

ts
interface TNTGamesTournamentRound {
  readonly round: number;
  readonly wins: number;
  readonly deaths: number;
}
FieldRaw source
roundThe numeric <round> suffix.
winswins_tourney_tnt_run_<round>
deathsdeaths_tourney_tnt_run_<round>

TNTGamesPVPRunStats

ts
interface TNTGamesPVPRunStats {
  readonly wins: number;
  readonly kills: number;
  readonly deaths: number;
  readonly bestTime: number;
  readonly regeneration: number;
  readonly notoriety: number;
  readonly fortitude: number;
  readonly doubleJumps: number;
  readonly doubleJumpsLegacy: number;
  readonly prefix: string;
}
FieldRaw source
winswins_pvprun
killskills_pvprun
deathsdeaths_pvprun
bestTimerecord_pvprun
regenerationnew_pvprun_regeneration
notorietynew_pvprun_notoriety
fortitudenew_pvprun_fortitude
doubleJumpsnew_pvprun_double_jumps
doubleJumpsLegacynew_pvprun_double_jumps_legacy
prefixprefix_pvprun

TNTGamesBowSpleefStats

ts
interface TNTGamesBowSpleefStats {
  readonly wins: number;
  readonly deaths: number;
  readonly tags: number;
  readonly doubleJumpTier: number;
  readonly repulsorTier: number;
  readonly tripleShotTier: number;
  readonly doubleJumps: number;
  readonly doubleJumpsLegacy: number;
  readonly repulsor: number;
  readonly repulsorLegacy: number;
  readonly tripleShot: number;
  readonly tripleShotLegacy: number;
  readonly arrowRain: number;
  readonly explosiveDash: number;
  readonly fireFlurry: number;
  readonly fireFlurryCapitalized: number;
  readonly arrowTrail: string;
  readonly arrowTrailLegacy: string;
  readonly prefix: string;
}
FieldRaw source
winswins_bowspleef
deathsdeaths_bowspleef
tagstags_bowspleef
doubleJumpTierspleef_doublejump
repulsorTierspleef_repulse
tripleShotTierspleef_triple
doubleJumpsnew_spleef_double_jumps
doubleJumpsLegacynew_spleef_double_jumps_legacy
repulsornew_spleef_repulsor
repulsorLegacynew_spleef_repulsor_legacy
tripleShotnew_spleef_tripleshot
tripleShotLegacynew_spleef_tripleshot_legacy
arrowRainnew_spleef_arrowrain
explosiveDashnew_spleef_exlosive_dash (raw key is misspelled).
fireFlurrynew_spleef_fireflurry
fireFlurryCapitalizednew_spleef_FireFlurry
arrowTrailnew_spleef_arrowtrail
arrowTrailLegacyspleef_arrowtrail
prefixprefix_bowspleef

TNTGamesTNTTagStats

ts
interface TNTGamesTNTTagStats {
  readonly wins: number;
  readonly kills: number;
  readonly deaths: number;
  readonly speedy: number;
  readonly speed: number;
  readonly blastProtection: number;
  readonly speedItUp: number;
  readonly slowItDown: number;
  readonly suit: string;
  readonly suitLegacy: string;
  readonly prefix: string;
}
FieldRaw source
winswins_tntag
killskills_tntag
deathsdeaths_tntag
speedynew_tntag_speedy
speedtag_speed
blastProtectiontag_blastprotection
speedItUptag_speeditup
slowItDowntag_slowitdown
suitnew_tag_suit
suitLegacytag_suit
prefixprefix_tntag

Wizards

TNTGamesWizardsStats

Aggregate Wizards stats plus a typed block for each of the ten wizard classes.

ts
interface TNTGamesWizardsStats {
  readonly wins: number;
  readonly kills: number;
  readonly assists: number;
  readonly deaths: number;
  readonly points: number;
  readonly kineticHealing: number;
  readonly airTime: number;
  readonly captureClass: string;
  readonly selectedClass: string;
  readonly prefix: string;
  readonly ancient: TNTGamesAncientWizard;
  readonly arcane: TNTGamesArcaneWizard;
  readonly blood: TNTGamesBloodWizard;
  readonly fire: TNTGamesFireWizard;
  readonly hydro: TNTGamesHydroWizard;
  readonly ice: TNTGamesIceWizard;
  readonly kinetic: TNTGamesKineticWizard;
  readonly storm: TNTGamesStormWizard;
  readonly toxic: TNTGamesToxicWizard;
  readonly wither: TNTGamesWitherWizard;
}
FieldRaw source
winswins_capture
killskills_capture
assistsassists_capture
deathsdeaths_capture
pointspoints_capture
kineticHealingkinetic_healing_capture
airTimeair_time_capture
captureClasscapture_class
selectedClasswizards_selected_class
prefixprefix_capture

TNTGamesWizardBase

The shared shape underlying every wizard class. Read with a per-class raw key prefix (e.g. new_firewizard, arcane_wizard).

ts
interface TNTGamesWizardBase {
  readonly explode: number;
  readonly regen: number;
  readonly kills: number;
  readonly deaths: number;
  readonly assists: number;
  readonly healing: number;
  readonly damageTaken: number;
  readonly alternateEffectsStatus: boolean;
  readonly alternateEffects: string;
}
FieldRaw source (relative to prefix)
explode<prefix>_explode
regen<prefix>_regen
kills<prefix>_kills
deaths<prefix>_deaths
assists<prefix>_assists
healing<prefix>_healing
damageTaken<prefix>_damage_taken
alternateEffectsStatus<prefix>_alternate_effects_status
alternateEffects<prefix>_alternate_effects

TNTGamesWizardPrestige

ts
interface TNTGamesWizardPrestige {
  readonly prestigeField: string;
}

prestigeField reads <prefix>_prestige_field.

TNTGamesWizardLegacy

ts
interface TNTGamesWizardLegacy {
  readonly explodeLegacy: number;
  readonly regenLegacy: number;
}
FieldRaw source (relative to prefix)
explodeLegacy<prefix>_explode_legacy
regenLegacy<prefix>_regen_legacy

TNTGamesWizardTier

Read with the legacy (non-new_) wizard key (e.g. firewizard).

ts
interface TNTGamesWizardTier {
  readonly explodeTier: number;
  readonly regenTier: number;
  readonly prestigeFieldLegacy: string;
}
FieldRaw source (relative to legacy key)
explodeTier<wizard>_explode
regenTier<wizard>_regen
prestigeFieldLegacy<wizard>_prestige_field

Per-class wizard interfaces

Each wizard class composes a subset of the base / prestige / legacy / tier shapes above. The table lists the interface, the raw key prefix used for the base / prestige / legacy parts, the legacy key used for the tier part, and the interfaces it extends.

ts
interface TNTGamesAncientWizard
  extends TNTGamesWizardBase, TNTGamesWizardPrestige {}
interface TNTGamesArcaneWizard extends TNTGamesWizardBase {}
interface TNTGamesBloodWizard
  extends
    TNTGamesWizardBase,
    TNTGamesWizardPrestige,
    TNTGamesWizardLegacy,
    TNTGamesWizardTier {}
interface TNTGamesFireWizard
  extends
    TNTGamesWizardBase,
    TNTGamesWizardPrestige,
    TNTGamesWizardLegacy,
    TNTGamesWizardTier {}
interface TNTGamesHydroWizard
  extends TNTGamesWizardBase, TNTGamesWizardPrestige {}
interface TNTGamesIceWizard
  extends
    TNTGamesWizardBase,
    TNTGamesWizardPrestige,
    TNTGamesWizardLegacy,
    TNTGamesWizardTier {}
interface TNTGamesKineticWizard
  extends
    TNTGamesWizardBase,
    TNTGamesWizardPrestige,
    TNTGamesWizardLegacy,
    TNTGamesWizardTier {}
interface TNTGamesStormWizard
  extends TNTGamesWizardBase, TNTGamesWizardPrestige {}
interface TNTGamesToxicWizard
  extends
    TNTGamesWizardBase,
    TNTGamesWizardPrestige,
    TNTGamesWizardLegacy,
    TNTGamesWizardTier {}
interface TNTGamesWitherWizard
  extends
    TNTGamesWizardBase,
    TNTGamesWizardPrestige,
    TNTGamesWizardLegacy,
    TNTGamesWizardTier {}
Wizard fieldInterfaceBase/prestige/legacy prefixTier key
ancientTNTGamesAncientWizardnew_ancientwizard
arcaneTNTGamesArcaneWizardarcane_wizard
bloodTNTGamesBloodWizardnew_bloodwizardbloodwizard
fireTNTGamesFireWizardnew_firewizardfirewizard
hydroTNTGamesHydroWizardnew_hydrowizard
iceTNTGamesIceWizardnew_icewizardicewizard
kineticTNTGamesKineticWizardnew_kineticwizardkineticwizard
stormTNTGamesStormWizardnew_stormwizard
toxicTNTGamesToxicWizardnew_toxicwizardtoxicwizard
witherTNTGamesWitherWizardnew_witherwizardwitherwizard

Settings and cosmetics

TNTGamesFlags

Read from the raw flags object.

ts
interface TNTGamesFlags {
  readonly enableExplosiveDash: boolean;
  readonly giveDjFeather: boolean;
  readonly showPreGameHints: boolean;
  readonly showTipHolograms: boolean;
  readonly showTntRunActionbarInfo: boolean;
  readonly showTntTagActionbarInfo: boolean;
  readonly showWinPrefixes: boolean;
  readonly showWizPres: boolean;
  readonly showWizardsActionbarInfo: boolean;
  readonly showWizardsCooldownNotifications: boolean;
}
FieldRaw source
enableExplosiveDashenable_explosive_dash
giveDjFeathergive_dj_feather
showPreGameHintsshow_pre_game_hints
showTipHologramsshow_tip_holograms
showTntRunActionbarInfoshow_tntrun_actionbar_info
showTntTagActionbarInfoshow_tnttag_actionbar_info
showWinPrefixesshow_win_prefixes
showWizPresshow_wiz_pres
showWizardsActionbarInfoshow_wizards_actionbar_info
showWizardsCooldownNotificationsshow_wizards_cooldown_notifications

TNTGamesPrivateGames

Read from the raw privategames object.

ts
interface TNTGamesPrivateGames {
  readonly bowSpleefHeavyArrows: boolean;
  readonly bowSpleefQuintuple: boolean;
  readonly bowSpleefDjMultiplier: string;
  readonly healthBuff: string;
  readonly lowGravity: boolean;
  readonly maxedPerks: boolean;
  readonly oneHitOneKill: boolean;
  readonly pvpRunArmorType: string;
  readonly pvpRunKnockback: boolean;
  readonly pvpRunSwordType: string;
  readonly speed: string;
  readonly tntRunHeavyFeet: boolean;
  readonly tntRunSnowballs: boolean;
  readonly tntTagDeathmatch: boolean;
  readonly tntTagNoPowerups: boolean;
  readonly wizardsCaptureSpeed: string;
  readonly wizardsDeathPenalty: string;
  readonly wizardsManaRegen: string;
  readonly wizardsMaxClasses: boolean;
  readonly wizardsNoRegen: boolean;
}
FieldRaw source
bowSpleefHeavyArrowsbow_spleef_heavy_arrows
bowSpleefQuintuplebow_spleef_quintuple
bowSpleefDjMultiplierbowspleef_dj_multiplier
healthBuffhealth_buff
lowGravitylow_gravity
maxedPerksmaxed_perks
oneHitOneKillone_hit_one_kill
pvpRunArmorTypepvp_run_armor_type
pvpRunKnockbackpvp_run_knockback
pvpRunSwordTypepvp_run_sword_type
speedspeed
tntRunHeavyFeettnt_run_heavy_feet
tntRunSnowballstnt_run_snowballs
tntTagDeathmatchtnt_tag_deathmatch
tntTagNoPowerupstnt_tag_no_powerups
wizardsCaptureSpeedwizards_capture_speed
wizardsDeathPenaltywizards_death_penalty
wizardsManaRegenwizards_mana_regen
wizardsMaxClasseswizards_max_classes
wizardsNoRegenwizards_no_regen

TNTGamesLeaderboardSettings

Read from the raw leaderboardSettings object.

ts
interface TNTGamesLeaderboardSettings {
  readonly mode: string;
  readonly resetType: string;
}
FieldRaw source
modemode
resetTyperesetType

TNTGamesMapVote

One entry per raw key prefixed votes_.

ts
interface TNTGamesMapVote {
  readonly map: string;
  readonly votes: number;
}
FieldRaw source
mapThe portion of the key after votes_.
votesThe numeric value at votes_<map>.

TNTGamesFavorites

Read from the raw favorites object.

ts
interface TNTGamesFavorites {
  readonly deathEffect: readonly string[];
}

deathEffect reads the raw death_effect array, keeping only string entries.

Released under the MIT License.