From 68961b782d5a51e7b204f3fa9a8d76554a73fed0 Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 27 Aug 2024 14:32:38 +0800 Subject: [PATCH] feat(WoolGames): Move WoolWars into WoolGames --- src/index.js | 2 +- src/structures/MiniGames/Arcade.js | 72 ---- src/structures/MiniGames/WoolGames.js | 398 ++++++++++++++++++ src/structures/MiniGames/WoolWars.js | 174 -------- src/structures/Player.js | 6 +- src/structures/SkyBlock/SkyblockMuseumItem.js | 2 +- tests/Client#getPlayer.js | 10 +- typings/index.d.ts | 120 +++--- 8 files changed, 478 insertions(+), 306 deletions(-) create mode 100644 src/structures/MiniGames/WoolGames.js delete mode 100644 src/structures/MiniGames/WoolWars.js diff --git a/src/index.js b/src/index.js index 41ce3fd8..f32ed622 100644 --- a/src/index.js +++ b/src/index.js @@ -80,7 +80,7 @@ module.exports = { VampireZ: require('./structures/MiniGames/VampireZ.js'), Walls: require('./structures/MiniGames/Walls.js'), Warlords: require('./structures/MiniGames/Warlords.js'), - WoolWars: require('./structures/MiniGames/WoolWars.js'), + WoolGames: require('./structures/MiniGames/WoolGames.js'), /* Leaderboards */ Leaderboard: require('./structures/Leaderboard.js'), diff --git a/src/structures/MiniGames/Arcade.js b/src/structures/MiniGames/Arcade.js index 8409252c..f37ff4f7 100644 --- a/src/structures/MiniGames/Arcade.js +++ b/src/structures/MiniGames/Arcade.js @@ -240,73 +240,6 @@ class BountyHunters { this.swordKills = data.sword_kills_oneinthequiver || 0; } } -/** - * Capture the Wool class - */ -class CaptureTheWool { - constructor(data) { - /** - * Wins - * @type {number} - */ - this.wins = data.woolhunt_participated_wins || 0; - /** - * Losses - * @type {number} - */ - this.losses = data.woolhunt_participated_losses || 0; - /** - * Win Loss ratio - * @type {number} - */ - this.WLRatio = divide(this.wins, this.losses); - /** - * Draws - * @type {number} - */ - this.draws = data.woolhunt_participated_draws || 0; - /** - * Kills - * @type {number} - */ - this.kills = data.woolhunt_kills || 0; - /** - * Deaths - * @type {number} - */ - this.deaths = data.woolhunt_deaths || 0; - /** - * Kill Death ratio - * @type {number} - */ - this.KDRatio = divide(this.kills, this.deaths); - /** - * assists - * @type {number} - */ - this.assists = data.woolhunt_assists || 0; - /** - * woolPickedUp - * @type {number} - */ - this.woolPickedUp = data.woolhunt_wools_stolen || 0; - /** - * woolCaptured - * @type {number} - */ - this.woolCaptured = data.woolhunt_wools_captured || 0; - /** - * fastestWin (In seconds) - * @type {number} - */ - this.fastestWin = data.woolhunt_fastest_win || 0; - /** - * longestGame (In seconds) - * @type {number} - */ - this.longestGame = data.woolhunt_longest_game || 0; - } -} /** * Dragon Wars class */ @@ -977,11 +910,6 @@ class Arcade { * @type {BountyHunters} */ this.bountyHunters = new BountyHunters(data); - /** - * Capture The Wool - * @type {CaptureTheWool} - */ - this.captureTheWool = new CaptureTheWool(data); /** * Dragon wars stats * @type {DragonWars} diff --git a/src/structures/MiniGames/WoolGames.js b/src/structures/MiniGames/WoolGames.js new file mode 100644 index 00000000..fccea780 --- /dev/null +++ b/src/structures/MiniGames/WoolGames.js @@ -0,0 +1,398 @@ +const { divide } = require('../../utils'); + +class WoolWarsClass { + /** + * Constructor + * @param {Record} data Data from API + */ + constructor(data, className) { + /** + * Wins + * @type {number} + */ + this.wins = data?.[className]?.wins || 0; + /** + * Kills + * @type {number} + */ + this.kills = data?.[className]?.kills || 0; + /** + * Assists + * @type {number} + */ + this.assists = data?.[className]?.assists || 0; + /** + * Deaths + * @type {number} + */ + this.deaths = data?.[className]?.deaths || 0; + /** + * KDRatio + * @type {number} + */ + this.KDRatio = divide(this.kills, this.deaths); + /** + * Games Played + * @type {number} + */ + this.gamesPlayed = data?.[className]?.games_played || 0; + /** + * Wools Placed + * @type {number} + */ + this.woolsPlaced = data?.[className]?.wool_placed || 0; + /** + * Blocks Broken + * @type {number} + */ + this.blocksBroken = data?.[className]?.blocks_broken || 0; + /** + * Place Break Ratio + * @type {number} + */ + this.placeBreakRatio = divide(this.woolsPlaced, this.blocksBroken); + /** + * Powerups Collected + * @type {number} + */ + this.powerups = data?.[className]?.powerups_gotten || 0; + } +} + +/** + * Wool Wars Class + */ +class WoolWars { + /** + * Constructor + * @param {Record} data Data from API + */ + constructor(data) { + /** + * Selected Class + * @type {'ASSAULT' | 'TANK' | 'GOLEM' | 'SWORDSMAN' | 'ENGINEER' | 'ARCHER' | 'NONE'} + */ + this.selectedClass = data?.selected_class || 'NONE'; + /** + * Wins + * @type {number} + */ + this.wins = data?.stats.wins || 0; + /** + * Kills + * @type {number} + */ + this.kills = data?.stats.kills || 0; + /** + * Assists + * @type {number} + */ + this.assists = data?.stats.assists || 0; + /** + * Deaths + * @type {number} + */ + this.deaths = data?.stats.deaths || 0; + /** + * KDRatio + * @type {number} + */ + this.KDRatio = divide(this.kills, this.deaths); + /** + * Games Played + * @type {number} + */ + this.gamesPlayed = data?.stats.games_played || 0; + /** + * Wools Placed + * @type {number} + */ + this.woolsPlaced = data?.stats.wool_placed || 0; + /** + * Blocks Broken + * @type {number} + */ + this.blocksBroken = data?.stats.blocks_broken || 0; + /** + * Place Break Ratio + * @type {number} + */ + this.placeBreakRatio = divide(this.woolsPlaced, this.blocksBroken); + /** + * powerups + * @type {number} + */ + this.powerups = data?.powerups_gotten || 0; + /** + * Assault Class Stats + * @type {WoolWarsClass} + */ + this.assault = new WoolWarsClass(data.stats.classes, 'assault'); + /** + * Tank Class Stats + * @type {WoolWarsClass} + */ + this.tank = new WoolWarsClass(data.stats.classes, 'tank'); + /** + * Golem Class Stats + * @type {WoolWarsClass} + */ + this.golem = new WoolWarsClass(data.stats.classes, 'golem'); + /** + * Swordsman Class Stats + * @type {WoolWarsClass} + */ + this.swordsman = new WoolWarsClass(data.stats.classes, 'swordsman'); + /** + * Engineer Class Stats + * @type {WoolWarsClass} + */ + this.engineer = new WoolWarsClass(data.stats.classes, 'engineer'); + /** + * Archer Class Stats + * @type {WoolWarsClass} + */ + this.archer = new WoolWarsClass(data.stats.classes, 'archer'); + } +} +/** + * Capture The Wool Stats Class + */ +class CaptureTheWool { + /** + * Constructor + * @param {Record} data Data from API + */ + constructor(data) { + /** + * kills + * @type {number} + */ + this.kills = data?.stats.kills || 0; + /** + * Assists + * @type {number} + */ + this.assists = data?.stats.assists || 0; + /** + * Deaths + * @type {number} + */ + this.deaths = data?.stats.deaths || 0; + /** + * KDRatio + * @type {number} + */ + this.KDRatio = divide(this.kills, this.deaths); + /** + * Kills With Wool + * @type {number} + */ + this.killsWithWool = data?.stats.kills_with_wool || 0; + /** + * Deaths With Wool + * @type {number} + */ + this.deathsWithWool = data?.stats.deaths_with_wool || 0; + /** + * KDRatio With Wool + * @type {number} + */ + this.KDRatioWithWool = divide(this.killsWithWool, this.deathsWithWool); + /** + * Wool Captured + * @type {number} + */ + this.woolCaptured = data?.stats.wools_captured || 0; + /** + * Wool Stolen + * @type {number} + */ + this.woolStolen = data?.stats.wools_stolen || 0; + /** + * Wool Capture Stolen Ratio + * @type {number} + */ + this.woolCaptureStolenRatio = divide(this.woolCaptured, this.woolStolen); + } +} +/** + * Sheep Wars Stats Class + */ +class SheepWars { + /** + * Constructor + * @param {Record} data Data from API + */ + constructor(data) { + /** + * Wins + * @type {number} + */ + this.wins = data?.stats?.wins || 0; + /** + * Kills + * @type {number} + */ + this.kills = data?.stats?.kills || 0; + /** + * Kills Void + * @type {number} + */ + this.killsVoid = data?.stats?.kills_void || 0; + /** + K kills Bow + * @type {number} + */ + this.killsBow = data?.stats?.kills_bow || 0; + /** + * Kills Explosive + * @type {number} + */ + this.killsExplosive = data?.stats?.kills_explosive || 0; + /** + * Deaths + * @type {number} + */ + this.deaths = data?.stats?.deaths || 0; + /** + * Deaths Void + * @type {number} + */ + this.deathsVoid = data?.stats?.deaths_void || 0; + /** + * Deaths Melee + * @type {number} + */ + this.deathsMelee = data?.stats?.deaths_melee || 0; + /** + * Deaths Explosive + * @type {number} + */ + this.deathsExplosive = data?.stats?.deaths_explosive || 0; + /** + * KDRatio + * @type {number} + */ + this.KDRatio = divide(this.wins, this.deaths); + /** + * Losses + * @type {number} + */ + this.losses = data?.stats?.losses || 0; + /** + * WLRatio + * @type {number} + */ + this.WLRatio = divide(this.wins, this.losses); + /** + * Games Played + * @type {number} + */ + this.gamesPlayed = data?.stats?.games_played || 0; + /** + * Damage Dealt + * @type {number} + */ + this.damageDealt = data?.stats?.damage_dealt || 0; + /** + * Sheep Thrown + * @type {number} + */ + this.sheepThrown = data?.stats?.sheep_thrown || 0; + /** + * Magic Wool Hit + * @type {number} + */ + this.magicWoolHit = data?.stats?.magic_wool_hit || 0; + } +} + +class WoolGames { + constructor(data) { + /** + * Layers + * @type {number} + */ + this.layers = data.progression?.available_layers || 0; + /** + * XP + * @type {number} + */ + this.xp = data.progression?.experience || 0; + /** + * exactLevel + * @type {number} + */ + this.exactLevel = this.convertXPToLevel(this.xp); + /** + * level + * @type {number} + */ + this.level = Math.floor(this.exactLevel); + /** + * coins + * @type {number} + */ + this.coins = data.coins || 0; + /** + * Owned Cosmetics + * @type {string[]} + */ + this.ownedCosmetics = data.packages || []; + /** + * Private Games Config + * @type {number} + */ + this.privateGamesConfig = data.privategames || {}; + /** + * Playtime + * @type {number} + */ + this.playtime = data.playtime || 0; + /** + * Wool Wars + * @type {WoolWars} + */ + this.woolWars = new WoolWars(data.wool_wars); + /** + * Capture The Wool + * @type {CaptureTheWool} + */ + this.captureTheWool = new CaptureTheWool(data.capture_the_wool); + /** + * Sheep Wars + * @type {SheepWars} + */ + this.sheepWars = new SheepWars(data.sheep_wars); + } + + /** + * Converts XP to Level + * @param {number} exp xp + * @return {number} + */ + convertXPToLevel(exp) { + const minimalExp = [0, 1e3, 3e3, 6e3, 1e4, 15e3]; + const baseLevel = minimalExp.length; + const baseExp = minimalExp[minimalExp.length - 1]; + const expToLevel100 = 49e4; + if (exp < baseExp) return minimalExp.findIndex((x) => exp < x); + const theoreticalLevel = (exp - baseExp) / 5e3 + baseLevel; + if (100 < theoreticalLevel) return 100 + this.convertXPToLevel(exp - expToLevel100); + return theoreticalLevel; + } +} + +/** + * @typedef {object} SkyblockMemberHotm + * @property {boolean} one_hit_one_kill one hit one kill + * @property {'Enabled' | 'Disabled'} rainbow_wool rainbow wool + * @property {string} health_buff health buff + * @property {string} game_speed game speed + * @property {string} speed speed + * @property {'Enabled' | 'Disabled'} no_class no class + * @property {boolean} respawn_enable respawn enable + */ + +module.exports = WoolGames; diff --git a/src/structures/MiniGames/WoolWars.js b/src/structures/MiniGames/WoolWars.js deleted file mode 100644 index a45617dd..00000000 --- a/src/structures/MiniGames/WoolWars.js +++ /dev/null @@ -1,174 +0,0 @@ -const { divide } = require('../../utils'); - -/** - * Wool Wars Class - */ -class WoolWars { - /** - * Constructor - * @param {Record} data Data from API - */ - constructor(data) { - /** - * Sheep layers, similar to prestige - * @type {number} - */ - this.layers = data.progression?.available_layers || 0; - /** - * Wool Wars XP - * @type {number} - */ - this.xp = data.progression?.experience || 0; - /** - * Wool Wars Decimal Level - * @type {number} - */ - this.exactLevel = WoolWars.convertXPToLevel(this.xp); - /** - * Wool wars level (as shown in game) - * @type {number} - */ - this.level = Math.floor(this.exactLevel); - /** - * Coins - * @type {number} - */ - this.coins = data.coins || 0; - /** - * Wins - * @type {number} - */ - this.wins = data.wins || 0; - /** - * gamesPlayed - * @type {number} - */ - this.gamesPlayed = data.games_played || 0; - /** - * woolsPlaced - * @type {number} - */ - this.woolsPlaced = data.wool_placed || 0; - /** - * blocksBroken - * @type {number} - */ - this.blocksBroken = data.blocks_broken || 0; - /** - * placeBreakRatio - * @type {number} - */ - this.placeBreakRatio = divide(this.woolsPlaced, this.blocksBroken); - /** - * kills - * @type {number} - */ - this.kills = data.kills || 0; - /** - * deaths - * @type {number} - */ - this.deaths = data.deaths || 0; - /** - * KDRatio - * @type {number} - */ - this.KDRatio = divide(this.kills, this.deaths); - /** - * assists - * @type {number} - */ - this.assists = data.assists || 0; - /** - * powerups - * @type {number} - */ - this.powerups = data.powerups_gotten || 0; - /** - * Selected class, or NONE if field isn't present in API for some reason - * @type {'ASSAULT'|'TANK'|'GOLEM'|'SWORDSMAN'|'ENGINEER'|'ARCHER'|'NONE'} - */ - this.selectedClass = data.wool_wars?.selected_class || 'NONE'; - this.stats = { - assault: WoolWars.generateStatsFor(data.wool_wars?.stats, 'assault'), - tank: WoolWars.generateStatsFor(data.wool_wars?.stats, 'tank'), - golem: WoolWars.generateStatsFor(data.wool_wars?.stats, 'golem'), - swordsman: WoolWars.generateStatsFor(data.wool_wars?.stats, 'swordsman'), - engineer: WoolWars.generateStatsFor(data.wool_wars?.stats, 'engineer'), - archer: WoolWars.generateStatsFor(data.wool_wars?.stats, 'archer') - }; - /** - * Owned Cosmetics - * @type {string[]} - */ - this.ownedCosmetics = data.packages || []; - /** - * Private Games config - * @type {PrivateGamesConfig} - */ - this.privateGamesConfig = data.privategames || {}; - } - /** - * Converts XP to Level - * @param {number} exp xp - * @return {number} - */ - static convertXPToLevel(exp) { - const minimalExp = [0, 1e3, 3e3, 6e3, 1e4, 15e3]; - const baseLevel = minimalExp.length; - const baseExp = minimalExp[minimalExp.length - 1]; - const expToLevel100 = 49e4; - if (exp < baseExp) return minimalExp.findIndex((x) => exp < x); - const theoreticalLevel = (exp - baseExp) / 5e3 + baseLevel; - if (100 < theoreticalLevel) return 100 + this.convertXPToLevel(exp - expToLevel100); - return theoreticalLevel; - } - /** - * Generates stats per class/overall - * @param {Record} data data - * @param {string} [_class=''] Class - * @return {WoolWarsStats} - */ - static generateStatsFor(data, _class) { - // N.B i called it _class instead of class because reserved keyword - - // eslint-disable-next-line no-underscore-dangle - const workingData = (_class ? data?.classes?.[_class] : data) || {}; - return { - wins: workingData.wins || 0, - gamesPlayed: workingData.games_played || 0, - woolsPlaced: workingData.wool_placed || 0, - blocksBroken: workingData.blocks_broken || 0, - placeBreakRatio: divide(workingData.wool_placed || 0, workingData.blocks_broken || 0), - kills: workingData.kills || 0, - deaths: workingData.deaths || 0, - KDRatio: divide(workingData.kills, workingData.deaths), - assists: workingData.assists || 0, - powerups: workingData.powerups_gotten || 0 - }; - } -} -/** - * @typedef {Object} PrivateGamesConfig NB. There could be more fields - * @property {boolean} one_hit_one_kill One hit one kill - * @property {'Enabled'|'Disabled'} rainbow_wool Rainbow wool - * @property {string} health_buff Health Buff - * @property {string} game_speed Game speed - * @property {string} speed Player speed - * @property {'Enabled'|'Disabled'} no_class No class - * @property {boolean} respawn_enable Respawning enabled - */ -/** - * @typedef {Object} WoolWarsStats - * @property {number} wins wins - * @property {number} gamesPlayed games played - * @property {number} woolsPlaced wools placed - * @property {number} blocksBroken blocks broken - * @property {number} placeBreakRatio broken blocks to placed wool ratio - * @property {number} kills kills - * @property {number} deaths deaths - * @property {number} KDRatio KDR - * @property {number} assists assists (not included in KDR) - * @property {number} powerups number of powerups picked up - */ -module.exports = WoolWars; diff --git a/src/structures/Player.js b/src/structures/Player.js index b51209f3..91733a8e 100644 --- a/src/structures/Player.js +++ b/src/structures/Player.js @@ -29,7 +29,7 @@ const Paintball = require('./MiniGames/Paintball'); const Quakecraft = require('./MiniGames/Quakecraft'); const Walls = require('./MiniGames/Walls'); const Warlords = require('./MiniGames/Warlords'); -const WoolWars = require('./MiniGames/WoolWars'); +const WoolGames = require('./MiniGames/WoolGames'); const Pit = require('./MiniGames/Pit'); const Guild = require('./Guild/Guild'); const RecentGame = require('./RecentGame'); @@ -240,7 +240,7 @@ class Player { vampirez: data.stats.VampireZ ? new VampireZ(data.stats.VampireZ) : null, walls: data.stats.Walls ? new Walls(data.stats.Walls) : null, warlords: data.stats.Battleground ? new Warlords(data.stats.Battleground) : null, - woolwars: data.stats.WoolGames ? new WoolWars(data.stats.WoolGames) : null + woolgames: data.stats.WoolGames ? new WoolGames(data.stats.WoolGames) : null } : null; /** @@ -325,7 +325,7 @@ class Player { * @property {VampireZ|null} vampirez VampireZ * @property {Walls|null} walls Walls * @property {Warlords|null} warlords Warlords - * @property {WoolWars|null} woolwars Wool Wars + * @property {WoolGames|null} woolgames Wool Games */ /** * @typedef {Object} RanksPurchaseTime diff --git a/src/structures/SkyBlock/SkyblockMuseumItem.js b/src/structures/SkyBlock/SkyblockMuseumItem.js index 2feba13c..c1ea7cee 100644 --- a/src/structures/SkyBlock/SkyblockMuseumItem.js +++ b/src/structures/SkyBlock/SkyblockMuseumItem.js @@ -14,7 +14,7 @@ class SkyblockMuseumItem { this.name = data.name; /** * Item - * @type {SkyblockInventoryItem} + * @type {SkyblockInventoryItem[]} */ this.items = []; data.decoded.forEach((item) => { diff --git a/tests/Client#getPlayer.js b/tests/Client#getPlayer.js index 2c96f64e..945c25f2 100644 --- a/tests/Client#getPlayer.js +++ b/tests/Client#getPlayer.js @@ -20,7 +20,7 @@ const { Pets, Pet, Color, - WoolWars, + WoolGames, Errors, Player } = require('../src'); @@ -225,8 +225,8 @@ describe('Client#getPlayer', () => { if (playerTest.stats.arena) { expect(playerTest.stats.arena).instanceOf(ArenaBrawl); } - if (playerTest.stats.woolwars) { - expect(playerTest.stats.woolwars).instanceOf(WoolWars); + if (playerTest.stats.woolgames) { + expect(playerTest.stats.woolgames).instanceOf(WoolGames); } } }); @@ -424,8 +424,8 @@ describe('Client#getPlayer', () => { if (playerTest.stats.arena) { expect(playerTest.stats.arena).instanceOf(ArenaBrawl); } - if (playerTest.stats.woolwars) { - expect(playerTest.stats.woolwars).instanceOf(WoolWars); + if (playerTest.stats.woolgames) { + expect(playerTest.stats.woolgames).instanceOf(WoolGames); } } }); diff --git a/typings/index.d.ts b/typings/index.d.ts index a40b7d1f..5fc0495c 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1424,7 +1424,7 @@ declare module 'hypixel-api-reborn' { walls?: Walls; warlords?: Warlords; arcade?: Arcade; - woolwars?: WoolWars; + woolgames?: WoolGames; pit?: Pit; }; getRecentGames(): Promise; @@ -1474,49 +1474,71 @@ declare module 'hypixel-api-reborn' { extraAttributes: string | null; toString(): string; } - class WoolWars { - static convertXPToLevel(exp: number): number; - static generateStatsFor(data: Record, _class?: string | undefined): WoolWarsStats; + class WoolWarsClass { constructor(data: Record); - layers: number; - xp: number; - exactLevel: number; - level: number; - coins: number; wins: number; + kills: number; + assists: number; + deaths: number; + KDRatio: number; gamesPlayed: number; woolsPlaced: number; blocksBroken: number; placeBreakRatio: number; - kills: number; - deaths: number; - KDRatio: number; - assists: number; powerups: number; - selectedClass: 'ASSAULT' | 'TANK' | 'GOLEM' | 'SWORDSMAN' | 'ENGINEER' | 'ARCHER' | 'NONE'; - stats: { - assault: WoolWarsStats; - tank: WoolWarsStats; - golem: WoolWarsStats; - swordsman: WoolWarsStats; - engineer: WoolWarsStats; - archer: WoolWarsStats; - }; - ownedCosmetics: string[]; - privateGamesConfig: PrivateGamesConfig; } - type WoolWarsStats = { + class WoolWars { + constructor(data: Record); + selectedClass: 'ASSAULT' | 'TANK' | 'GOLEM' | 'SWORDSMAN' | 'ENGINEER' | 'ARCHER' | 'NONE'; wins: number; + kills: number; + assists: number; + deaths: number; + KDRatio: number; gamesPlayed: number; woolsPlaced: number; blocksBroken: number; placeBreakRatio: number; + powerups: number; + assault: WoolWarsClass; + tank: WoolWarsClass; + golem: WoolWarsClass; + swordsman: WoolWarsClass; + engineer: WoolWarsClass; + archer: WoolWarsClass; + } + class CaptureTheWool { + constructor(data: Record); kills: number; + assists: number; deaths: number; KDRatio: number; - assists: number; - powerups: number; - }; + killsWithWool: number; + deathsWithWool: number; + KDRatioWithWool: number; + woolCaptured: number; + woolStolen: number; + woolCaptureStolenRatio: number; + } + class SheepWars { + constructor(data: Record); + wins: number; + kills: number; + killsVoid: number; + killsBow: number; + killsExplosive: number; + deaths: number; + deathsVoid: number; + deathsMelee: number; + deathsExplosive: number; + KDRatio: number; + losses: number; + WLRatio: number; + gamesPlayed: number; + damageDealt: number; + sheepThrown: number; + magicWoolHit: number; + } type PrivateGamesConfig = { one_hit_one_kill: boolean; rainbow_wool: 'Enabled' | 'Disabled'; @@ -1526,6 +1548,20 @@ declare module 'hypixel-api-reborn' { no_class: 'Enabled' | 'Disabled'; respawn_enable: boolean; }; + class WoolGames { + constructor(data: Record); + layers: number; + xp: number; + exactLevel: number; + level: number; + coins: number; + ownedCosmetics: string[]; + privateGamesConfig: PrivateGamesConfig; + playtime: number; + woolWars: WoolWars; + captureTheWool: CaptureTheWool; + sheepWars: SheepWars; + } class PlayerCosmetics { constructor(data: Record); allCosmetics: string[]; @@ -1805,7 +1841,6 @@ declare module 'hypixel-api-reborn' { flashDisabled: boolean; blockingDead: BlockingDead; bountyHunters: BountyHunters; - captureTheWool: CaptureTheWool; dragonWars: DragonWars; dropper: Dropper; enderSpleef: EnderSpleef; @@ -1835,21 +1870,6 @@ declare module 'hypixel-api-reborn' { bowKills: number; swordKills: number; } - class CaptureTheWool { - constructor(data: Record); - wins: number; - losses: number; - WLRatio: number; - draws: number; - kills: number; - deaths: number; - KDRatio: number; - assists: number; - woolPickedUp: number; - woolCaptured: number; - fastestWin: number; - longestGame: number; - } class DragonWars { constructor(data: Record); wins: number; @@ -2634,12 +2654,12 @@ declare module 'hypixel-api-reborn' { } class SkyblockMuseumItem { constructor(data: Record); - name:string|null - items:SkyblockInventoryItem[] - donatedTime:number - donatedTimeAt:Date - borrowing:boolean - featuredSlot:string|null + name: string | null; + items: SkyblockInventoryItem[]; + donatedTime: number; + donatedTimeAt: Date; + borrowing: boolean; + featuredSlot: string | null; } class SkyblockMuseum { constructor(data: Record);