hypixel-api-reborn 11.3.4 → 12.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.github/ISSUE_TEMPLATE/Bug_report.md +9 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +25 -0
- package/.github/SECURITY.md +21 -0
- package/.github/labels.yml +24 -0
- package/.github/workflows/ci-cd.yml +126 -0
- package/.vscode/extensions.json +10 -0
- package/README.md +0 -63
- package/dist/API/getAchievements.d.ts +10 -0
- package/dist/API/getAchievements.js +22 -0
- package/dist/API/getAchievements.js.map +1 -0
- package/dist/API/getActiveHouses.d.ts +10 -0
- package/dist/API/getActiveHouses.js +22 -0
- package/dist/API/getActiveHouses.js.map +1 -0
- package/dist/API/getBoosters.d.ts +10 -0
- package/dist/API/getBoosters.js +22 -0
- package/dist/API/getBoosters.js.map +1 -0
- package/dist/API/getChallenges.d.ts +10 -0
- package/dist/API/getChallenges.js +22 -0
- package/dist/API/getChallenges.js.map +1 -0
- package/dist/API/getGameCounts.d.ts +10 -0
- package/dist/API/getGameCounts.js +22 -0
- package/dist/API/getGameCounts.js.map +1 -0
- package/dist/API/getGuild.d.ts +10 -0
- package/dist/API/getGuild.js +36 -0
- package/dist/API/getGuild.js.map +1 -0
- package/dist/API/getGuildAchievements.d.ts +10 -0
- package/dist/API/getGuildAchievements.js +22 -0
- package/dist/API/getGuildAchievements.js.map +1 -0
- package/dist/API/getHouse.d.ts +10 -0
- package/dist/API/getHouse.js +24 -0
- package/dist/API/getHouse.js.map +1 -0
- package/dist/API/getLeaderboards.d.ts +9 -0
- package/dist/API/getLeaderboards.js +32 -0
- package/dist/API/getLeaderboards.js.map +1 -0
- package/dist/API/getPlayer.d.ts +10 -0
- package/dist/API/getPlayer.js +37 -0
- package/dist/API/getPlayer.js.map +1 -0
- package/dist/API/getPlayerHouses.d.ts +10 -0
- package/dist/API/getPlayerHouses.js +25 -0
- package/dist/API/getPlayerHouses.js.map +1 -0
- package/dist/API/getQuests.d.ts +10 -0
- package/dist/API/getQuests.js +22 -0
- package/dist/API/getQuests.js.map +1 -0
- package/dist/API/getRecentGames.d.ts +10 -0
- package/dist/API/getRecentGames.js +25 -0
- package/dist/API/getRecentGames.js.map +1 -0
- package/dist/API/getSkyblockAuction.d.ts +10 -0
- package/dist/API/getSkyblockAuction.js +38 -0
- package/dist/API/getSkyblockAuction.js.map +1 -0
- package/dist/API/getSkyblockAuctions.d.ts +24 -0
- package/dist/API/getSkyblockAuctions.js +57 -0
- package/dist/API/getSkyblockAuctions.js.map +1 -0
- package/dist/API/getSkyblockAuctionsByPlayer.d.ts +10 -0
- package/dist/API/getSkyblockAuctionsByPlayer.js +25 -0
- package/dist/API/getSkyblockAuctionsByPlayer.js.map +1 -0
- package/dist/API/getSkyblockBazaar.d.ts +10 -0
- package/dist/API/getSkyblockBazaar.js +22 -0
- package/dist/API/getSkyblockBazaar.js.map +1 -0
- package/dist/API/getSkyblockBingo.d.ts +10 -0
- package/dist/API/getSkyblockBingo.js +22 -0
- package/dist/API/getSkyblockBingo.js.map +1 -0
- package/dist/API/getSkyblockFireSales.d.ts +10 -0
- package/dist/API/getSkyblockFireSales.js +22 -0
- package/dist/API/getSkyblockFireSales.js.map +1 -0
- package/dist/API/getSkyblockGarden.d.ts +10 -0
- package/dist/API/getSkyblockGarden.js +24 -0
- package/dist/API/getSkyblockGarden.js.map +1 -0
- package/dist/API/getSkyblockGovernment.d.ts +10 -0
- package/dist/API/getSkyblockGovernment.js +22 -0
- package/dist/API/getSkyblockGovernment.js.map +1 -0
- package/dist/API/getSkyblockMember.d.ts +10 -0
- package/dist/API/getSkyblockMember.js +46 -0
- package/dist/API/getSkyblockMember.js.map +1 -0
- package/dist/API/getSkyblockMuseum.d.ts +10 -0
- package/dist/API/getSkyblockMuseum.js +25 -0
- package/dist/API/getSkyblockMuseum.js.map +1 -0
- package/dist/API/getSkyblockNews.d.ts +10 -0
- package/dist/API/getSkyblockNews.js +22 -0
- package/dist/API/getSkyblockNews.js.map +1 -0
- package/dist/API/getSkyblockProfiles.d.ts +10 -0
- package/dist/API/getSkyblockProfiles.js +47 -0
- package/dist/API/getSkyblockProfiles.js.map +1 -0
- package/dist/API/getStatus.d.ts +10 -0
- package/dist/API/getStatus.js +23 -0
- package/dist/API/getStatus.js.map +1 -0
- package/dist/API/getWatchdogStats.d.ts +10 -0
- package/dist/API/getWatchdogStats.js +22 -0
- package/dist/API/getWatchdogStats.js.map +1 -0
- package/dist/API/index.d.ts +57 -0
- package/dist/API/index.js +62 -0
- package/dist/API/index.js.map +1 -0
- package/dist/Client.d.ts +29 -0
- package/dist/Client.js +76 -0
- package/dist/Client.js.map +1 -0
- package/dist/Errors.d.ts +27 -0
- package/dist/Errors.js +31 -0
- package/dist/Errors.js.map +1 -0
- package/dist/Private/CacheHandler.d.ts +14 -0
- package/dist/Private/CacheHandler.js +37 -0
- package/dist/Private/CacheHandler.js.map +1 -0
- package/dist/Private/Endpoint.d.ts +7 -0
- package/dist/Private/Endpoint.js +13 -0
- package/dist/Private/Endpoint.js.map +1 -0
- package/dist/Private/RateLimit.d.ts +13 -0
- package/dist/Private/RateLimit.js +33 -0
- package/dist/Private/RateLimit.js.map +1 -0
- package/dist/Private/Requests.d.ts +29 -0
- package/dist/Private/Requests.js +112 -0
- package/dist/Private/Requests.js.map +1 -0
- package/dist/Private/Updater.d.ts +11 -0
- package/dist/Private/Updater.js +47 -0
- package/dist/Private/Updater.js.map +1 -0
- package/dist/index.d.ts +115 -0
- package/dist/index.js +132 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +66 -0
- package/dist/src/API/getAchievements.js +16 -0
- package/dist/src/API/getAchievements.test.js +74 -0
- package/dist/src/API/getActiveHouses.js +16 -0
- package/dist/src/API/getActiveHouses.test.js +43 -0
- package/dist/src/API/getBoosters.js +16 -0
- package/dist/src/API/getBoosters.test.js +72 -0
- package/dist/src/API/getChallenges.js +16 -0
- package/dist/src/API/getChallenges.test.js +51 -0
- package/dist/src/API/getGameCounts.js +16 -0
- package/dist/src/API/getGameCounts.test.js +26 -0
- package/dist/src/API/getGuild.js +30 -0
- package/dist/src/API/getGuild.test.js +508 -0
- package/dist/src/API/getGuildAchievements.js +16 -0
- package/dist/src/API/getGuildAchievements.test.js +51 -0
- package/dist/src/API/getHouse.js +18 -0
- package/dist/src/API/getHouse.test.js +51 -0
- package/dist/src/API/getLeaderboards.js +23 -0
- package/dist/src/API/getLeaderboards.test.js +55 -0
- package/dist/src/API/getPlayer.js +31 -0
- package/dist/src/API/getPlayer.test.js +290 -0
- package/dist/src/API/getPlayerHouses.js +19 -0
- package/dist/src/API/getPlayerHouses.test.js +50 -0
- package/dist/src/API/getQuests.js +16 -0
- package/dist/src/API/getQuests.test.js +48 -0
- package/dist/src/API/getRecentGames.js +19 -0
- package/dist/src/API/getRecentGames.test.js +52 -0
- package/dist/src/API/getSkyblockAuction.js +32 -0
- package/dist/src/API/getSkyblockAuction.test.js +382 -0
- package/dist/src/API/getSkyblockAuctions.js +51 -0
- package/dist/src/API/getSkyblockAuctions.test.js +366 -0
- package/dist/src/API/getSkyblockAuctionsByPlayer.js +19 -0
- package/dist/src/API/getSkyblockAuctionsByPlayer.test.js +207 -0
- package/dist/src/API/getSkyblockBazaar.js +16 -0
- package/dist/src/API/getSkyblockBazaar.test.js +51 -0
- package/dist/src/API/getSkyblockBingo.js +16 -0
- package/dist/src/API/getSkyblockBingo.test.js +40 -0
- package/dist/src/API/getSkyblockFireSales.js +16 -0
- package/dist/src/API/getSkyblockFireSales.test.js +55 -0
- package/dist/src/API/getSkyblockGarden.js +18 -0
- package/dist/src/API/getSkyblockGarden.test.js +43 -0
- package/dist/src/API/getSkyblockGovernment.js +16 -0
- package/dist/src/API/getSkyblockGovernment.test.js +60 -0
- package/dist/src/API/getSkyblockMember.js +40 -0
- package/dist/src/API/getSkyblockMember.test.js +648 -0
- package/dist/src/API/getSkyblockMuseum.js +19 -0
- package/dist/src/API/getSkyblockMuseum.test.js +78 -0
- package/dist/src/API/getSkyblockNews.js +16 -0
- package/dist/src/API/getSkyblockNews.test.js +35 -0
- package/dist/src/API/getSkyblockProfiles.js +41 -0
- package/dist/src/API/getSkyblockProfiles.test.js +121 -0
- package/dist/src/API/getStatus.js +17 -0
- package/dist/src/API/getStatus.test.js +57 -0
- package/dist/src/API/getWatchdogStats.js +16 -0
- package/dist/src/API/getWatchdogStats.test.js +37 -0
- package/dist/src/API/index.js +56 -0
- package/dist/src/Client.js +70 -0
- package/dist/src/Client.test.js +115 -0
- package/dist/src/Errors.js +28 -0
- package/dist/src/Private/CacheHandler.js +31 -0
- package/dist/src/Private/CacheHandler.test.js +37 -0
- package/dist/src/Private/Endpoint.js +10 -0
- package/dist/src/Private/Endpoint.test.js +17 -0
- package/dist/src/Private/RateLimit.js +30 -0
- package/dist/src/Private/RateLimit.test.js +73 -0
- package/dist/src/Private/Requests.js +106 -0
- package/dist/src/Private/Requests.test.js +48 -0
- package/dist/src/Private/Updater.js +41 -0
- package/dist/src/Private/Updater.test.js +52 -0
- package/dist/src/index.js +34 -0
- package/dist/src/structures/Boosters/Booster.js +38 -0
- package/dist/src/structures/Boosters/Booster.test.js +7 -0
- package/dist/src/structures/Color.js +73 -0
- package/dist/src/structures/Color.test.js +23 -0
- package/dist/src/structures/Game.js +31 -0
- package/dist/src/structures/GameCounts.js +23 -0
- package/dist/src/structures/Guild/Guild.js +61 -0
- package/dist/src/structures/Guild/GuildMember.js +30 -0
- package/dist/src/structures/Guild/GuildRank.js +20 -0
- package/dist/src/structures/House.js +22 -0
- package/dist/src/structures/House.test.js +24 -0
- package/dist/src/structures/ItemBytes.js +10 -0
- package/dist/src/structures/Leaderboard.js +17 -0
- package/dist/src/structures/Leaderboard.test.js +25 -0
- package/dist/src/structures/MiniGames/Arcade.js +437 -0
- package/dist/src/structures/MiniGames/Arcade.test.js +643 -0
- package/dist/src/structures/MiniGames/ArenaBrawl.js +48 -0
- package/dist/src/structures/MiniGames/ArenaBrawl.test.js +120 -0
- package/dist/src/structures/MiniGames/BedWars.js +299 -0
- package/dist/src/structures/MiniGames/BedWars.test.js +936 -0
- package/dist/src/structures/MiniGames/BlitzSurvivalGames.js +170 -0
- package/dist/src/structures/MiniGames/BlitzSurvivalGames.test.js +2238 -0
- package/dist/src/structures/MiniGames/BuildBattle.js +27 -0
- package/dist/src/structures/MiniGames/BuildBattle.test.js +42 -0
- package/dist/src/structures/MiniGames/CopsAndCrims.js +126 -0
- package/dist/src/structures/MiniGames/CopsAndCrims.test.js +162 -0
- package/dist/src/structures/MiniGames/Duels.js +466 -0
- package/dist/src/structures/MiniGames/Duels.test.js +1853 -0
- package/dist/src/structures/MiniGames/MegaWalls.js +194 -0
- package/dist/src/structures/MiniGames/MegaWalls.test.js +4790 -0
- package/dist/src/structures/MiniGames/MurderMystery.js +84 -0
- package/dist/src/structures/MiniGames/MurderMystery.test.js +241 -0
- package/dist/src/structures/MiniGames/Paintball.js +36 -0
- package/dist/src/structures/MiniGames/Paintball.test.js +51 -0
- package/dist/src/structures/MiniGames/Pit.js +124 -0
- package/dist/src/structures/MiniGames/Pit.test.js +218 -0
- package/dist/src/structures/MiniGames/PitInventoryItem.js +19 -0
- package/dist/src/structures/MiniGames/Quakecraft.js +68 -0
- package/dist/src/structures/MiniGames/Quakecraft.test.js +105 -0
- package/dist/src/structures/MiniGames/SkyWars.js +264 -0
- package/dist/src/structures/MiniGames/Skywars.test.js +413 -0
- package/dist/src/structures/MiniGames/SmashHeroes.js +110 -0
- package/dist/src/structures/MiniGames/SmashHeroes.test.js +647 -0
- package/dist/src/structures/MiniGames/SpeedUHC.js +72 -0
- package/dist/src/structures/MiniGames/SpeedUHC.test.js +245 -0
- package/dist/src/structures/MiniGames/TNTGames.js +120 -0
- package/dist/src/structures/MiniGames/TNTGames.test.js +139 -0
- package/dist/src/structures/MiniGames/TurboKartRacers.js +57 -0
- package/dist/src/structures/MiniGames/TurboKartRacers.test.js +140 -0
- package/dist/src/structures/MiniGames/UHC.js +109 -0
- package/dist/src/structures/MiniGames/UHC.test.js +180 -0
- package/dist/src/structures/MiniGames/VampireZ.js +38 -0
- package/dist/src/structures/MiniGames/VampireZ.test.js +59 -0
- package/dist/src/structures/MiniGames/Walls.js +22 -0
- package/dist/src/structures/MiniGames/Walls.test.js +32 -0
- package/dist/src/structures/MiniGames/Warlords.js +76 -0
- package/dist/src/structures/MiniGames/Warlords.test.js +405 -0
- package/dist/src/structures/MiniGames/WoolWars.js +81 -0
- package/dist/src/structures/MiniGames/WoolWars.test.js +251 -0
- package/dist/src/structures/Pet.js +38 -0
- package/dist/src/structures/Pets.js +14 -0
- package/dist/src/structures/Player.js +147 -0
- package/dist/src/structures/Player.test.js +96 -0
- package/dist/src/structures/PlayerCosmetics.js +53 -0
- package/dist/src/structures/RecentGame.js +25 -0
- package/dist/src/structures/SkyBlock/Auctions/Auction.js +39 -0
- package/dist/src/structures/SkyBlock/Auctions/AuctionInfo.js +15 -0
- package/dist/src/structures/SkyBlock/Auctions/BaseAuction.js +19 -0
- package/dist/src/structures/SkyBlock/Auctions/BaseAuction.test.js +20 -0
- package/dist/src/structures/SkyBlock/Auctions/Bid.js +20 -0
- package/dist/src/structures/SkyBlock/Bazaar/Order.js +16 -0
- package/dist/src/structures/SkyBlock/Bazaar/Order.test.js +23 -0
- package/dist/src/structures/SkyBlock/Bazaar/Product.js +23 -0
- package/dist/src/structures/SkyBlock/Bazaar/Product.test.js +46 -0
- package/dist/src/structures/SkyBlock/News/SkyblockNews.js +32 -0
- package/dist/src/structures/SkyBlock/SkyblockGarden.js +62 -0
- package/dist/src/structures/SkyBlock/SkyblockGarden.test.js +22 -0
- package/dist/src/structures/SkyBlock/SkyblockInventoryItem.js +78 -0
- package/dist/src/structures/SkyBlock/SkyblockMember.js +406 -0
- package/dist/src/structures/SkyBlock/SkyblockMember.test.js +71 -0
- package/dist/src/structures/SkyBlock/SkyblockMuseum.js +29 -0
- package/dist/src/structures/SkyBlock/SkyblockMuseumItem.js +24 -0
- package/dist/src/structures/SkyBlock/SkyblockPet.js +27 -0
- package/dist/src/structures/SkyBlock/SkyblockProfile.js +36 -0
- package/dist/src/structures/SkyBlock/Static/Bingo.js +49 -0
- package/dist/src/structures/SkyBlock/Static/BingoData.js +19 -0
- package/dist/src/structures/SkyBlock/Static/Candidate.js +19 -0
- package/dist/src/structures/SkyBlock/Static/FireSale.js +22 -0
- package/dist/src/structures/SkyBlock/Static/Government.js +33 -0
- package/dist/src/structures/SkyBlock/Static/Perk.js +9 -0
- package/dist/src/structures/Static/Achievement.js +44 -0
- package/dist/src/structures/Static/AchievementTier.js +14 -0
- package/dist/src/structures/Static/Achievements.js +15 -0
- package/dist/src/structures/Static/Challenges.js +15 -0
- package/dist/src/structures/Static/GameAchievements.js +14 -0
- package/dist/src/structures/Static/GameChallenges.js +18 -0
- package/dist/src/structures/Static/GameQuests.js +10 -0
- package/dist/src/structures/Static/GuildAchievements.js +15 -0
- package/dist/src/structures/Static/Quest.js +24 -0
- package/dist/src/structures/Static/Quests.js +15 -0
- package/dist/src/structures/Status.js +17 -0
- package/dist/src/structures/Status.test.js +18 -0
- package/dist/src/structures/WatchdogStats.js +15 -0
- package/dist/src/structures/WatchdogStats.test.js +23 -0
- package/dist/src/utils/Constants.js +2170 -0
- package/dist/src/utils/Guild.js +71 -0
- package/dist/src/utils/Player.js +88 -0
- package/dist/src/utils/Player.test.js +82 -0
- package/dist/src/utils/SkyblockUtils.js +342 -0
- package/dist/src/utils/SkyblockUtils.test.js +8 -0
- package/dist/src/utils/divide.js +6 -0
- package/dist/src/utils/divide.test.js +12 -0
- package/dist/src/utils/isGuildID.js +3 -0
- package/dist/src/utils/isGuildID.test.js +16 -0
- package/dist/src/utils/isUUID.js +5 -0
- package/dist/src/utils/isUUID.test.js +31 -0
- package/dist/src/utils/oscillation.js +13 -0
- package/dist/src/utils/oscillation.test.js +17 -0
- package/dist/src/utils/removeSnakeCase.js +14 -0
- package/dist/src/utils/romanize.js +41 -0
- package/dist/src/utils/romanize.test.js +8 -0
- package/dist/structures/Boosters/Booster.d.ts +17 -0
- package/dist/structures/Boosters/Booster.js +44 -0
- package/dist/structures/Boosters/Booster.js.map +1 -0
- package/dist/structures/Color.d.ts +9 -0
- package/dist/structures/Color.js +76 -0
- package/dist/structures/Color.js.map +1 -0
- package/dist/structures/Game.d.ts +16 -0
- package/dist/structures/Game.js +35 -0
- package/dist/structures/Game.js.map +1 -0
- package/dist/structures/GameCounts.d.ts +7 -0
- package/dist/structures/GameCounts.js +29 -0
- package/dist/structures/GameCounts.js.map +1 -0
- package/dist/structures/Guild/Guild.d.ts +39 -0
- package/dist/structures/Guild/Guild.js +67 -0
- package/dist/structures/Guild/Guild.js.map +1 -0
- package/dist/structures/Guild/GuildMember.d.ts +15 -0
- package/dist/structures/Guild/GuildMember.js +33 -0
- package/dist/structures/Guild/GuildMember.js.map +1 -0
- package/dist/structures/Guild/GuildRank.d.ts +11 -0
- package/dist/structures/Guild/GuildRank.js +23 -0
- package/dist/structures/Guild/GuildRank.js.map +1 -0
- package/dist/structures/House.d.ts +12 -0
- package/dist/structures/House.js +25 -0
- package/dist/structures/House.js.map +1 -0
- package/dist/structures/ItemBytes.d.ts +7 -0
- package/dist/structures/ItemBytes.js +17 -0
- package/dist/structures/ItemBytes.js.map +1 -0
- package/dist/structures/Leaderboard.d.ts +8 -0
- package/dist/structures/Leaderboard.js +16 -0
- package/dist/structures/Leaderboard.js.map +1 -0
- package/dist/structures/MiniGames/Arcade.d.ts +234 -0
- package/dist/structures/MiniGames/Arcade.js +466 -0
- package/dist/structures/MiniGames/Arcade.js.map +1 -0
- package/dist/structures/MiniGames/ArenaBrawl.d.ts +26 -0
- package/dist/structures/MiniGames/ArenaBrawl.js +54 -0
- package/dist/structures/MiniGames/ArenaBrawl.js.map +1 -0
- package/dist/structures/MiniGames/BedWars.d.ts +116 -0
- package/dist/structures/MiniGames/BedWars.js +300 -0
- package/dist/structures/MiniGames/BedWars.js.map +1 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.d.ts +87 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.js +176 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.js.map +1 -0
- package/dist/structures/MiniGames/BuildBattle.d.ts +18 -0
- package/dist/structures/MiniGames/BuildBattle.js +33 -0
- package/dist/structures/MiniGames/BuildBattle.js.map +1 -0
- package/dist/structures/MiniGames/CopsAndCrims.d.ts +67 -0
- package/dist/structures/MiniGames/CopsAndCrims.js +132 -0
- package/dist/structures/MiniGames/CopsAndCrims.js.map +1 -0
- package/dist/structures/MiniGames/Duels.d.ts +188 -0
- package/dist/structures/MiniGames/Duels.js +473 -0
- package/dist/structures/MiniGames/Duels.js.map +1 -0
- package/dist/structures/MiniGames/MegaWalls.d.ts +99 -0
- package/dist/structures/MiniGames/MegaWalls.js +200 -0
- package/dist/structures/MiniGames/MegaWalls.js.map +1 -0
- package/dist/structures/MiniGames/MurderMystery.d.ts +44 -0
- package/dist/structures/MiniGames/MurderMystery.js +90 -0
- package/dist/structures/MiniGames/MurderMystery.js.map +1 -0
- package/dist/structures/MiniGames/Paintball.d.ts +19 -0
- package/dist/structures/MiniGames/Paintball.js +42 -0
- package/dist/structures/MiniGames/Paintball.js.map +1 -0
- package/dist/structures/MiniGames/Pit.d.ts +41 -0
- package/dist/structures/MiniGames/Pit.js +138 -0
- package/dist/structures/MiniGames/Pit.js.map +1 -0
- package/dist/structures/MiniGames/PitInventoryItem.d.ts +10 -0
- package/dist/structures/MiniGames/PitInventoryItem.js +20 -0
- package/dist/structures/MiniGames/PitInventoryItem.js.map +1 -0
- package/dist/structures/MiniGames/Quakecraft.d.ts +35 -0
- package/dist/structures/MiniGames/Quakecraft.js +74 -0
- package/dist/structures/MiniGames/Quakecraft.js.map +1 -0
- package/dist/structures/MiniGames/SkyWars.d.ts +112 -0
- package/dist/structures/MiniGames/SkyWars.js +272 -0
- package/dist/structures/MiniGames/SkyWars.js.map +1 -0
- package/dist/structures/MiniGames/SmashHeroes.d.ts +58 -0
- package/dist/structures/MiniGames/SmashHeroes.js +116 -0
- package/dist/structures/MiniGames/SmashHeroes.js.map +1 -0
- package/dist/structures/MiniGames/SpeedUHC.d.ts +36 -0
- package/dist/structures/MiniGames/SpeedUHC.js +74 -0
- package/dist/structures/MiniGames/SpeedUHC.js.map +1 -0
- package/dist/structures/MiniGames/TNTGames.d.ts +66 -0
- package/dist/structures/MiniGames/TNTGames.js +126 -0
- package/dist/structures/MiniGames/TNTGames.js.map +1 -0
- package/dist/structures/MiniGames/TurboKartRacers.d.ts +31 -0
- package/dist/structures/MiniGames/TurboKartRacers.js +60 -0
- package/dist/structures/MiniGames/TurboKartRacers.js.map +1 -0
- package/dist/structures/MiniGames/UHC.d.ts +31 -0
- package/dist/structures/MiniGames/UHC.js +115 -0
- package/dist/structures/MiniGames/UHC.js.map +1 -0
- package/dist/structures/MiniGames/VampireZ.d.ts +21 -0
- package/dist/structures/MiniGames/VampireZ.js +44 -0
- package/dist/structures/MiniGames/VampireZ.js.map +1 -0
- package/dist/structures/MiniGames/Walls.d.ts +12 -0
- package/dist/structures/MiniGames/Walls.js +28 -0
- package/dist/structures/MiniGames/Walls.js.map +1 -0
- package/dist/structures/MiniGames/Warlords.d.ts +40 -0
- package/dist/structures/MiniGames/Warlords.js +82 -0
- package/dist/structures/MiniGames/Warlords.js.map +1 -0
- package/dist/structures/MiniGames/WoolWars.d.ts +49 -0
- package/dist/structures/MiniGames/WoolWars.js +87 -0
- package/dist/structures/MiniGames/WoolWars.js.map +1 -0
- package/dist/structures/Pet.d.ts +19 -0
- package/dist/structures/Pet.js +41 -0
- package/dist/structures/Pet.js.map +1 -0
- package/dist/structures/Pets.d.ts +38 -0
- package/dist/structures/Pets.js +20 -0
- package/dist/structures/Pets.js.map +1 -0
- package/dist/structures/Player.d.ts +73 -0
- package/dist/structures/Player.js +158 -0
- package/dist/structures/Player.js.map +1 -0
- package/dist/structures/PlayerCosmetics.d.ts +26 -0
- package/dist/structures/PlayerCosmetics.js +120 -0
- package/dist/structures/PlayerCosmetics.js.map +1 -0
- package/dist/structures/RecentGame.d.ts +13 -0
- package/dist/structures/RecentGame.js +30 -0
- package/dist/structures/RecentGame.js.map +1 -0
- package/dist/structures/ServerInfo.d.ts +20 -0
- package/dist/structures/ServerInfo.js +34 -0
- package/dist/structures/ServerInfo.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/Auction.d.ts +22 -0
- package/dist/structures/SkyBlock/Auctions/Auction.js +45 -0
- package/dist/structures/SkyBlock/Auctions/Auction.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.d.ts +10 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.js +21 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.d.ts +11 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.js +25 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/Bid.d.ts +11 -0
- package/dist/structures/SkyBlock/Auctions/Bid.js +23 -0
- package/dist/structures/SkyBlock/Auctions/Bid.js.map +1 -0
- package/dist/structures/SkyBlock/Bazzar/Order.d.ts +9 -0
- package/dist/structures/SkyBlock/Bazzar/Order.js +19 -0
- package/dist/structures/SkyBlock/Bazzar/Order.js.map +1 -0
- package/dist/structures/SkyBlock/Bazzar/Product.d.ts +19 -0
- package/dist/structures/SkyBlock/Bazzar/Product.js +33 -0
- package/dist/structures/SkyBlock/Bazzar/Product.js.map +1 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.d.ts +10 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.js +35 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockGarden.d.ts +60 -0
- package/dist/structures/SkyBlock/SkyblockGarden.js +65 -0
- package/dist/structures/SkyBlock/SkyblockGarden.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.d.ts +38 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.js +83 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMember.d.ts +80 -0
- package/dist/structures/SkyBlock/SkyblockMember.js +288 -0
- package/dist/structures/SkyBlock/SkyblockMember.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.d.ts +10 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.js +35 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.d.ts +11 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.js +30 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockPet.d.ts +15 -0
- package/dist/structures/SkyBlock/SkyblockPet.js +33 -0
- package/dist/structures/SkyBlock/SkyblockPet.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockProfile.d.ts +14 -0
- package/dist/structures/SkyBlock/SkyblockProfile.js +42 -0
- package/dist/structures/SkyBlock/SkyblockProfile.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Bingo.d.ts +16 -0
- package/dist/structures/SkyBlock/Static/Bingo.js +52 -0
- package/dist/structures/SkyBlock/Static/Bingo.js.map +1 -0
- package/dist/structures/SkyBlock/Static/BingoData.d.ts +10 -0
- package/dist/structures/SkyBlock/Static/BingoData.js +25 -0
- package/dist/structures/SkyBlock/Static/BingoData.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Candidate.d.ts +11 -0
- package/dist/structures/SkyBlock/Static/Candidate.js +25 -0
- package/dist/structures/SkyBlock/Static/Candidate.js.map +1 -0
- package/dist/structures/SkyBlock/Static/FireSale.d.ts +12 -0
- package/dist/structures/SkyBlock/Static/FireSale.js +25 -0
- package/dist/structures/SkyBlock/Static/FireSale.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Government.d.ts +13 -0
- package/dist/structures/SkyBlock/Static/Government.js +39 -0
- package/dist/structures/SkyBlock/Static/Government.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Perk.d.ts +6 -0
- package/dist/structures/SkyBlock/Static/Perk.js +12 -0
- package/dist/structures/SkyBlock/Static/Perk.js.map +1 -0
- package/dist/structures/Static/Achievement.d.ts +14 -0
- package/dist/structures/Static/Achievement.js +50 -0
- package/dist/structures/Static/Achievement.js.map +1 -0
- package/dist/structures/Static/AchievementTier.d.ts +7 -0
- package/dist/structures/Static/AchievementTier.js +17 -0
- package/dist/structures/Static/AchievementTier.js.map +1 -0
- package/dist/structures/Static/Achievements.d.ts +9 -0
- package/dist/structures/Static/Achievements.js +21 -0
- package/dist/structures/Static/Achievements.js.map +1 -0
- package/dist/structures/Static/Challenges.d.ts +9 -0
- package/dist/structures/Static/Challenges.js +21 -0
- package/dist/structures/Static/Challenges.js.map +1 -0
- package/dist/structures/Static/GameAchievements.d.ts +10 -0
- package/dist/structures/Static/GameAchievements.js +20 -0
- package/dist/structures/Static/GameAchievements.js.map +1 -0
- package/dist/structures/Static/GameChallenges.d.ts +13 -0
- package/dist/structures/Static/GameChallenges.js +21 -0
- package/dist/structures/Static/GameChallenges.js.map +1 -0
- package/dist/structures/Static/GameQuests.d.ts +8 -0
- package/dist/structures/Static/GameQuests.js +16 -0
- package/dist/structures/Static/GameQuests.js.map +1 -0
- package/dist/structures/Static/GuildAchievements.d.ts +8 -0
- package/dist/structures/Static/GuildAchievements.js +21 -0
- package/dist/structures/Static/GuildAchievements.js.map +1 -0
- package/dist/structures/Static/Quest.d.ts +20 -0
- package/dist/structures/Static/Quest.js +27 -0
- package/dist/structures/Static/Quest.js.map +1 -0
- package/dist/structures/Static/Quests.d.ts +9 -0
- package/dist/structures/Static/Quests.js +21 -0
- package/dist/structures/Static/Quests.js.map +1 -0
- package/dist/structures/Status.d.ts +10 -0
- package/dist/structures/Status.js +23 -0
- package/dist/structures/Status.js.map +1 -0
- package/dist/structures/Watchdog/Stats.d.ts +9 -0
- package/dist/structures/Watchdog/Stats.js +18 -0
- package/dist/structures/Watchdog/Stats.js.map +1 -0
- package/dist/utils/Constants.d.ts +1017 -0
- package/dist/utils/Constants.js +2197 -0
- package/dist/utils/Constants.js.map +1 -0
- package/dist/utils/Guild.d.ts +15 -0
- package/dist/utils/Guild.js +85 -0
- package/dist/utils/Guild.js.map +1 -0
- package/dist/utils/Player.d.ts +8 -0
- package/dist/utils/Player.js +98 -0
- package/dist/utils/Player.js.map +1 -0
- package/dist/utils/SkyblockUtils.d.ts +131 -0
- package/dist/utils/SkyblockUtils.js +394 -0
- package/dist/utils/SkyblockUtils.js.map +1 -0
- package/dist/utils/divide.d.ts +1 -0
- package/dist/utils/divide.js +10 -0
- package/dist/utils/divide.js.map +1 -0
- package/dist/utils/isGuildID.d.ts +1 -0
- package/dist/utils/isGuildID.js +7 -0
- package/dist/utils/isGuildID.js.map +1 -0
- package/dist/utils/isUUID.d.ts +1 -0
- package/dist/utils/isUUID.js +9 -0
- package/dist/utils/isUUID.js.map +1 -0
- package/dist/utils/oscillation.d.ts +2 -0
- package/dist/utils/oscillation.js +15 -0
- package/dist/utils/oscillation.js.map +1 -0
- package/dist/utils/removeSnakeCase.d.ts +3 -0
- package/dist/utils/removeSnakeCase.js +20 -0
- package/dist/utils/removeSnakeCase.js.map +1 -0
- package/dist/utils/romanize.d.ts +1 -0
- package/dist/utils/romanize.js +45 -0
- package/dist/utils/romanize.js.map +1 -0
- package/{eslint.config.mjs → eslint.config.js} +16 -14
- package/package.json +32 -25
- package/renovate.json +21 -0
- package/src/API/API.d.ts +16 -0
- package/src/API/getAchievements.test.ts +81 -0
- package/src/API/getAchievements.ts +20 -0
- package/src/API/getActiveHouses.test.ts +45 -0
- package/src/API/getActiveHouses.ts +20 -0
- package/src/API/getBoosters.test.ts +53 -0
- package/src/API/getBoosters.ts +20 -0
- package/src/API/getChallenges.test.ts +54 -0
- package/src/API/getChallenges.ts +19 -0
- package/src/API/getGameCounts.test.ts +28 -0
- package/src/API/getGameCounts.ts +20 -0
- package/src/API/getGuild.test.ts +478 -0
- package/src/API/getGuild.ts +35 -0
- package/src/API/getGuildAchievements.test.ts +59 -0
- package/src/API/getGuildAchievements.ts +20 -0
- package/src/API/getHouse.test.ts +55 -0
- package/src/API/getHouse.ts +21 -0
- package/src/API/getLeaderboards.test.ts +41 -0
- package/src/API/getLeaderboards.ts +30 -0
- package/src/API/getPlayer.test.ts +494 -0
- package/src/API/getPlayer.ts +33 -0
- package/src/API/getPlayerHouses.test.ts +53 -0
- package/src/API/getPlayerHouses.ts +22 -0
- package/src/API/getQuests.test.ts +51 -0
- package/src/API/getQuests.ts +20 -0
- package/src/API/getRecentGames.test.ts +51 -0
- package/src/API/getRecentGames.ts +22 -0
- package/src/API/getSkyblockAuction.test.ts +293 -0
- package/src/API/getSkyblockAuction.ts +36 -0
- package/src/API/getSkyblockAuctions.test.ts +346 -0
- package/src/API/getSkyblockAuctions.ts +59 -0
- package/src/API/getSkyblockAuctionsByPlayer.test.ts +249 -0
- package/src/API/getSkyblockAuctionsByPlayer.ts +22 -0
- package/src/API/getSkyblockBazaar.test.ts +52 -0
- package/src/API/getSkyblockBazaar.ts +20 -0
- package/src/API/getSkyblockBingo.test.ts +42 -0
- package/src/API/getSkyblockBingo.ts +20 -0
- package/src/API/getSkyblockFireSales.test.ts +43 -0
- package/src/API/getSkyblockFireSales.ts +20 -0
- package/src/API/getSkyblockGarden.test.ts +60 -0
- package/src/API/getSkyblockGarden.ts +21 -0
- package/src/API/getSkyblockGovernment.test.ts +78 -0
- package/src/API/getSkyblockGovernment.ts +20 -0
- package/src/API/getSkyblockMember.test.ts +308 -0
- package/src/API/getSkyblockMember.ts +45 -0
- package/src/API/getSkyblockMuseum.test.ts +91 -0
- package/src/API/getSkyblockMuseum.ts +22 -0
- package/src/API/getSkyblockNews.test.ts +45 -0
- package/src/API/getSkyblockNews.ts +20 -0
- package/src/API/getSkyblockProfiles.test.ts +164 -0
- package/src/API/getSkyblockProfiles.ts +43 -0
- package/src/API/getStatus.test.ts +42 -0
- package/src/API/getStatus.ts +21 -0
- package/src/API/getWatchdogStats.test.ts +44 -0
- package/src/API/getWatchdogStats.ts +20 -0
- package/src/API/index.ts +56 -0
- package/src/Client.test.ts +148 -0
- package/src/Client.ts +91 -0
- package/src/Errors.ts +42 -0
- package/src/Private/CacheHandler.test.ts +49 -0
- package/src/Private/CacheHandler.ts +41 -0
- package/src/Private/Endpoint.test.ts +23 -0
- package/src/Private/Endpoint.ts +14 -0
- package/src/Private/RateLimit.test.ts +99 -0
- package/src/Private/RateLimit.ts +38 -0
- package/src/Private/Requests.test.ts +59 -0
- package/src/Private/Requests.ts +128 -0
- package/src/Private/Updater.test.ts +68 -0
- package/src/Private/Updater.ts +48 -0
- package/src/index.ts +119 -0
- package/src/structures/Boosters/Booster.ts +40 -0
- package/src/structures/Color.ts +79 -0
- package/src/structures/Game.ts +147 -0
- package/src/structures/GameCounts.ts +26 -0
- package/src/structures/Guild/Guild.ts +67 -0
- package/src/structures/Guild/GuildMember.ts +33 -0
- package/src/structures/Guild/GuildRank.ts +22 -0
- package/src/structures/House.ts +24 -0
- package/src/structures/ItemBytes.ts +18 -0
- package/src/structures/Leaderboard.ts +14 -0
- package/src/structures/MiniGames/Arcade.ts +460 -0
- package/src/structures/MiniGames/ArenaBrawl.ts +51 -0
- package/src/structures/MiniGames/{BedWars.js → BedWars.ts} +198 -298
- package/src/structures/MiniGames/BlitzSurvivalGames.ts +173 -0
- package/src/structures/MiniGames/BuildBattle.ts +36 -0
- package/src/structures/MiniGames/CopsAndCrims.ts +131 -0
- package/src/structures/MiniGames/{Duels.js → Duels.ts} +200 -737
- package/src/structures/MiniGames/MegaWalls.ts +197 -0
- package/src/structures/MiniGames/MurderMystery.ts +87 -0
- package/src/structures/MiniGames/Paintball.ts +38 -0
- package/src/structures/MiniGames/Pit.ts +139 -0
- package/src/structures/MiniGames/PitInventoryItem.ts +18 -0
- package/src/structures/MiniGames/Quakecraft.ts +70 -0
- package/src/structures/MiniGames/SkyWars.ts +288 -0
- package/src/structures/MiniGames/SmashHeroes.ts +114 -0
- package/src/structures/MiniGames/SpeedUHC.ts +71 -0
- package/src/structures/MiniGames/TNTGames.ts +126 -0
- package/src/structures/MiniGames/TurboKartRacers.ts +59 -0
- package/src/structures/MiniGames/{UHC.js → UHC.ts} +32 -114
- package/src/structures/MiniGames/VampireZ.ts +41 -0
- package/src/structures/MiniGames/Walls.ts +24 -0
- package/src/structures/MiniGames/Warlords.ts +79 -0
- package/src/structures/MiniGames/WoolWars.ts +106 -0
- package/src/structures/Pet.ts +40 -0
- package/src/structures/Pets.ts +46 -0
- package/src/structures/Player.ts +199 -0
- package/src/structures/{PlayerCosmetics.js → PlayerCosmetics.ts} +36 -63
- package/src/structures/RecentGame.ts +27 -0
- package/src/structures/ServerInfo.ts +40 -0
- package/src/structures/SkyBlock/Auctions/Auction.ts +43 -0
- package/src/structures/SkyBlock/Auctions/AuctionInfo.ts +20 -0
- package/src/structures/SkyBlock/Auctions/BaseAuction.ts +22 -0
- package/src/structures/SkyBlock/Auctions/Bid.ts +22 -0
- package/src/structures/SkyBlock/Bazzar/Order.ts +18 -0
- package/src/structures/SkyBlock/Bazzar/Product.ts +40 -0
- package/src/structures/SkyBlock/News/SkyblockNews.ts +35 -0
- package/src/structures/SkyBlock/SkyblockGarden.ts +118 -0
- package/src/structures/SkyBlock/SkyblockInventoryItem.ts +83 -0
- package/src/structures/SkyBlock/SkyblockMember.ts +317 -0
- package/src/structures/SkyBlock/SkyblockMuseum.ts +43 -0
- package/src/structures/SkyBlock/SkyblockMuseumItem.ts +26 -0
- package/src/structures/SkyBlock/SkyblockPet.ts +30 -0
- package/src/structures/SkyBlock/SkyblockProfile.ts +42 -0
- package/src/structures/SkyBlock/Static/Bingo.ts +50 -0
- package/src/structures/SkyBlock/Static/BingoData.ts +21 -0
- package/src/structures/SkyBlock/Static/Candidate.ts +22 -0
- package/src/structures/SkyBlock/Static/FireSale.ts +24 -0
- package/src/structures/SkyBlock/Static/Government.ts +42 -0
- package/src/structures/SkyBlock/Static/Perk.ts +10 -0
- package/src/structures/Static/Achievement.ts +49 -0
- package/src/structures/Static/AchievementTier.ts +18 -0
- package/src/structures/Static/Achievements.ts +20 -0
- package/src/structures/Static/Challenges.ts +20 -0
- package/src/structures/Static/GameAchievements.ts +19 -0
- package/src/structures/Static/GameChallenges.ts +28 -0
- package/src/structures/Static/GameQuests.ts +13 -0
- package/src/structures/Static/GuildAchievements.ts +19 -0
- package/src/structures/Static/Quest.ts +37 -0
- package/src/structures/Static/Quests.ts +20 -0
- package/src/structures/Status.ts +20 -0
- package/src/structures/Watchdog/Stats.ts +16 -0
- package/src/typings/index.d.ts +24 -0
- package/src/utils/{Constants.js → Constants.ts} +201 -1248
- package/src/utils/Guild.ts +90 -0
- package/src/utils/Player.ts +93 -0
- package/src/utils/SkyblockUtils.test.ts +9 -0
- package/src/utils/SkyblockUtils.ts +516 -0
- package/src/utils/divide.test.ts +13 -0
- package/src/utils/{divide.js → divide.ts} +2 -2
- package/src/utils/isGuildID.test.ts +19 -0
- package/src/utils/isGuildID.ts +3 -0
- package/src/utils/isUUID.test.ts +35 -0
- package/src/utils/{isUUID.js → isUUID.ts} +2 -2
- package/src/utils/oscillation.ts +11 -0
- package/src/utils/removeSnakeCase.ts +18 -0
- package/src/utils/romanize.test.ts +9 -0
- package/src/utils/{romanize.js → romanize.ts} +3 -4
- package/tsconfig.json +25 -0
- package/vitest.config.ts +8 -0
- package/vitest.setup.ts +2 -0
- package/src/API/getAPIStatus.js +0 -8
- package/src/API/getAchievements.js +0 -7
- package/src/API/getBoosters.js +0 -7
- package/src/API/getChallenges.js +0 -7
- package/src/API/getGameCounts.js +0 -7
- package/src/API/getGuild.js +0 -19
- package/src/API/getGuildAchievements.js +0 -7
- package/src/API/getLeaderboards.js +0 -15
- package/src/API/getPlayer.js +0 -23
- package/src/API/getQuests.js +0 -7
- package/src/API/getRecentGames.js +0 -14
- package/src/API/getServerInfo.js +0 -71
- package/src/API/getStatus.js +0 -9
- package/src/API/getWatchdogStats.js +0 -7
- package/src/API/housing/getActiveHouses.js +0 -7
- package/src/API/housing/getHouse.js +0 -9
- package/src/API/housing/getPlayerHouses.js +0 -11
- package/src/API/index.js +0 -35
- package/src/API/skyblock/getAuction.js +0 -21
- package/src/API/skyblock/getAuctions.js +0 -74
- package/src/API/skyblock/getAuctionsByPlayer.js +0 -11
- package/src/API/skyblock/getBazaar.js +0 -8
- package/src/API/skyblock/getBingo.js +0 -7
- package/src/API/skyblock/getBingoByPlayer.js +0 -14
- package/src/API/skyblock/getEndedAuctions.js +0 -11
- package/src/API/skyblock/getFireSales.js +0 -7
- package/src/API/skyblock/getGarden.js +0 -11
- package/src/API/skyblock/getGovernment.js +0 -7
- package/src/API/skyblock/getMember.js +0 -35
- package/src/API/skyblock/getMuseum.js +0 -15
- package/src/API/skyblock/getNews.js +0 -7
- package/src/API/skyblock/getProfiles.js +0 -49
- package/src/Client.js +0 -547
- package/src/Errors.js +0 -66
- package/src/Private/defaultCache.js +0 -77
- package/src/Private/rateLimit.js +0 -83
- package/src/Private/requests.js +0 -76
- package/src/Private/updater.js +0 -34
- package/src/Private/uuidCache.js +0 -30
- package/src/Private/validate.js +0 -108
- package/src/index.js +0 -96
- package/src/structures/APIIncident.js +0 -71
- package/src/structures/APIStatus.js +0 -46
- package/src/structures/Boosters/Booster.js +0 -84
- package/src/structures/Color.js +0 -174
- package/src/structures/Game.js +0 -166
- package/src/structures/GameCounts.js +0 -151
- package/src/structures/Guild/Guild.js +0 -191
- package/src/structures/Guild/GuildMember.js +0 -66
- package/src/structures/Guild/GuildRank.js +0 -48
- package/src/structures/House.js +0 -54
- package/src/structures/ItemBytes.js +0 -33
- package/src/structures/Leaderboard.js +0 -31
- package/src/structures/MiniGames/Arcade.js +0 -1058
- package/src/structures/MiniGames/ArenaBrawl.js +0 -118
- package/src/structures/MiniGames/BlitzSurvivalGames.js +0 -424
- package/src/structures/MiniGames/BuildBattle.js +0 -64
- package/src/structures/MiniGames/CopsAndCrims.js +0 -318
- package/src/structures/MiniGames/MegaWalls.js +0 -478
- package/src/structures/MiniGames/MurderMystery.js +0 -214
- package/src/structures/MiniGames/Paintball.js +0 -87
- package/src/structures/MiniGames/Pit.js +0 -247
- package/src/structures/MiniGames/PitInventoryItem.js +0 -43
- package/src/structures/MiniGames/Quakecraft.js +0 -164
- package/src/structures/MiniGames/SkyWars.js +0 -669
- package/src/structures/MiniGames/SmashHeroes.js +0 -272
- package/src/structures/MiniGames/SpeedUHC.js +0 -168
- package/src/structures/MiniGames/TNTGames.js +0 -285
- package/src/structures/MiniGames/TurboKartRacers.js +0 -141
- package/src/structures/MiniGames/VampireZ.js +0 -93
- package/src/structures/MiniGames/Walls.js +0 -52
- package/src/structures/MiniGames/Warlords.js +0 -187
- package/src/structures/MiniGames/WoolWars.js +0 -174
- package/src/structures/Pet.js +0 -96
- package/src/structures/Pets.js +0 -64
- package/src/structures/Player.js +0 -346
- package/src/structures/RecentGame.js +0 -57
- package/src/structures/ServerInfo.js +0 -78
- package/src/structures/SkyBlock/Auctions/Auction.js +0 -106
- package/src/structures/SkyBlock/Auctions/AuctionInfo.js +0 -56
- package/src/structures/SkyBlock/Auctions/BaseAuction.js +0 -46
- package/src/structures/SkyBlock/Auctions/Bid.js +0 -49
- package/src/structures/SkyBlock/Auctions/PartialAuction.js +0 -26
- package/src/structures/SkyBlock/Bazzar/Order.js +0 -38
- package/src/structures/SkyBlock/Bazzar/Product.js +0 -53
- package/src/structures/SkyBlock/News/SkyblockNews.js +0 -60
- package/src/structures/SkyBlock/PlayerBingo.js +0 -49
- package/src/structures/SkyBlock/SkyblockGarden.js +0 -146
- package/src/structures/SkyBlock/SkyblockInventoryItem.js +0 -168
- package/src/structures/SkyBlock/SkyblockMember.js +0 -591
- package/src/structures/SkyBlock/SkyblockMuseum.js +0 -60
- package/src/structures/SkyBlock/SkyblockMuseumItem.js +0 -54
- package/src/structures/SkyBlock/SkyblockPet.js +0 -71
- package/src/structures/SkyBlock/SkyblockProfile.js +0 -81
- package/src/structures/SkyBlock/Static/Bingo.js +0 -101
- package/src/structures/SkyBlock/Static/BingoData.js +0 -45
- package/src/structures/SkyBlock/Static/Candidate.js +0 -50
- package/src/structures/SkyBlock/Static/FireSale.js +0 -55
- package/src/structures/SkyBlock/Static/Government.js +0 -79
- package/src/structures/SkyBlock/Static/Perk.js +0 -23
- package/src/structures/Static/Achievement.js +0 -87
- package/src/structures/Static/AchievementTier.js +0 -33
- package/src/structures/Static/Achievements.js +0 -30
- package/src/structures/Static/Challenges.js +0 -29
- package/src/structures/Static/GameAchievements.js +0 -36
- package/src/structures/Static/GameChallenges.js +0 -40
- package/src/structures/Static/GameQuests.js +0 -24
- package/src/structures/Static/GuildAchievements.js +0 -34
- package/src/structures/Static/Quest.js +0 -66
- package/src/structures/Static/Quests.js +0 -31
- package/src/structures/Status.js +0 -41
- package/src/structures/Watchdog/Stats.js +0 -36
- package/src/utils/Guild.js +0 -90
- package/src/utils/Player.js +0 -112
- package/src/utils/SkyblockUtils.js +0 -667
- package/src/utils/arrayTools.js +0 -4
- package/src/utils/index.js +0 -14
- package/src/utils/isGuildID.js +0 -3
- package/src/utils/oscillation.js +0 -17
- package/src/utils/removeSnakeCase.js +0 -33
- package/src/utils/rgbToHexColor.js +0 -8
- package/src/utils/toUuid.js +0 -24
- package/src/utils/varInt.js +0 -17
- package/typings/index.d.ts +0 -4297
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import Client from '../../Client';
|
|
2
|
+
import Pit from './Pit';
|
|
3
|
+
import PitInventoryItem from './PitInventoryItem';
|
|
4
|
+
import { expect, expectTypeOf, test } from 'vitest';
|
|
5
|
+
test('Pit', () => {
|
|
6
|
+
const data = new Pit({ stats: 'meow' });
|
|
7
|
+
expect(data).toBeInstanceOf(Pit);
|
|
8
|
+
expect(data.prestige).toBeDefined();
|
|
9
|
+
expectTypeOf(data.prestige).toEqualTypeOf();
|
|
10
|
+
expect(data.prestige).toBeGreaterThanOrEqual(0);
|
|
11
|
+
expect(data.xp).toBeDefined();
|
|
12
|
+
expectTypeOf(data.xp).toEqualTypeOf();
|
|
13
|
+
expect(data.xp).toBeGreaterThanOrEqual(0);
|
|
14
|
+
expect(data.level).toBeDefined();
|
|
15
|
+
expectTypeOf(data.level).toEqualTypeOf();
|
|
16
|
+
expect(data.level).toBeGreaterThanOrEqual(0);
|
|
17
|
+
expect(data.kills).toBeDefined();
|
|
18
|
+
expectTypeOf(data.kills).toEqualTypeOf();
|
|
19
|
+
expect(data.kills).toBeGreaterThanOrEqual(0);
|
|
20
|
+
expect(data.deaths).toBeDefined();
|
|
21
|
+
expectTypeOf(data.deaths).toEqualTypeOf();
|
|
22
|
+
expect(data.deaths).toBeGreaterThanOrEqual(0);
|
|
23
|
+
expect(data.KDR).toBeDefined();
|
|
24
|
+
expectTypeOf(data.KDR).toEqualTypeOf();
|
|
25
|
+
expect(data.KDR).toBeGreaterThanOrEqual(0);
|
|
26
|
+
expect(data.assists).toBeDefined();
|
|
27
|
+
expectTypeOf(data.assists).toEqualTypeOf();
|
|
28
|
+
expect(data.assists).toBeGreaterThanOrEqual(0);
|
|
29
|
+
expect(data.maxKillStreak).toBeDefined();
|
|
30
|
+
expectTypeOf(data.maxKillStreak).toEqualTypeOf();
|
|
31
|
+
expect(data.maxKillStreak).toBeGreaterThanOrEqual(0);
|
|
32
|
+
expect(data.playtime).toBeDefined();
|
|
33
|
+
expectTypeOf(data.playtime).toEqualTypeOf();
|
|
34
|
+
expect(data.playtime).toBeGreaterThanOrEqual(0);
|
|
35
|
+
expect(data.joins).toBeDefined();
|
|
36
|
+
expectTypeOf(data.joins).toEqualTypeOf();
|
|
37
|
+
expect(data.joins).toBeGreaterThanOrEqual(0);
|
|
38
|
+
expect(data.damageReceived).toBeDefined();
|
|
39
|
+
expectTypeOf(data.damageReceived).toEqualTypeOf();
|
|
40
|
+
expect(data.damageReceived).toBeGreaterThanOrEqual(0);
|
|
41
|
+
expect(data.damageDealt).toBeDefined();
|
|
42
|
+
expectTypeOf(data.damageDealt).toEqualTypeOf();
|
|
43
|
+
expect(data.damageDealt).toBeGreaterThanOrEqual(0);
|
|
44
|
+
expect(data.damageRatio).toBeDefined();
|
|
45
|
+
expectTypeOf(data.damageRatio).toEqualTypeOf();
|
|
46
|
+
expect(data.damageRatio).toBeGreaterThanOrEqual(0);
|
|
47
|
+
expect(data.meleeDamageReceived).toBeDefined();
|
|
48
|
+
expectTypeOf(data.meleeDamageReceived).toEqualTypeOf();
|
|
49
|
+
expect(data.meleeDamageReceived).toBeGreaterThanOrEqual(0);
|
|
50
|
+
expect(data.meleeDamageDealt).toBeDefined();
|
|
51
|
+
expectTypeOf(data.meleeDamageDealt).toEqualTypeOf();
|
|
52
|
+
expect(data.meleeDamageDealt).toBeGreaterThanOrEqual(0);
|
|
53
|
+
expect(data.swordHits).toBeDefined();
|
|
54
|
+
expectTypeOf(data.swordHits).toEqualTypeOf();
|
|
55
|
+
expect(data.swordHits).toBeGreaterThanOrEqual(0);
|
|
56
|
+
expect(data.leftClicks).toBeDefined();
|
|
57
|
+
expectTypeOf(data.leftClicks).toEqualTypeOf();
|
|
58
|
+
expect(data.leftClicks).toBeGreaterThanOrEqual(0);
|
|
59
|
+
expect(data.meleeAccuracy).toBeDefined();
|
|
60
|
+
expectTypeOf(data.meleeAccuracy).toEqualTypeOf();
|
|
61
|
+
expect(data.meleeAccuracy).toBeGreaterThanOrEqual(0);
|
|
62
|
+
expect(data.meleeDamageRatio).toBeDefined();
|
|
63
|
+
expectTypeOf(data.meleeDamageRatio).toEqualTypeOf();
|
|
64
|
+
expect(data.meleeDamageRatio).toBeGreaterThanOrEqual(0);
|
|
65
|
+
expect(data.bowDamageReceived).toBeDefined();
|
|
66
|
+
expectTypeOf(data.bowDamageReceived).toEqualTypeOf();
|
|
67
|
+
expect(data.bowDamageReceived).toBeGreaterThanOrEqual(0);
|
|
68
|
+
expect(data.bowDamageDealt).toBeDefined();
|
|
69
|
+
expectTypeOf(data.bowDamageDealt).toEqualTypeOf();
|
|
70
|
+
expect(data.bowDamageDealt).toBeGreaterThanOrEqual(0);
|
|
71
|
+
expect(data.arrowsHit).toBeDefined();
|
|
72
|
+
expectTypeOf(data.arrowsHit).toEqualTypeOf();
|
|
73
|
+
expect(data.arrowsHit).toBeGreaterThanOrEqual(0);
|
|
74
|
+
expect(data.arrowsFired).toBeDefined();
|
|
75
|
+
expectTypeOf(data.arrowsFired).toEqualTypeOf();
|
|
76
|
+
expect(data.arrowsFired).toBeGreaterThanOrEqual(0);
|
|
77
|
+
expect(data.bowAccuracy).toBeDefined();
|
|
78
|
+
expectTypeOf(data.bowAccuracy).toEqualTypeOf();
|
|
79
|
+
expect(data.bowAccuracy).toBeGreaterThanOrEqual(0);
|
|
80
|
+
expect(data.bowDamageRatio).toBeDefined();
|
|
81
|
+
expectTypeOf(data.bowDamageRatio).toEqualTypeOf();
|
|
82
|
+
expect(data.bowDamageRatio).toBeGreaterThanOrEqual(0);
|
|
83
|
+
expect(data.goldenHeadsEaten).toBeDefined();
|
|
84
|
+
expectTypeOf(data.goldenHeadsEaten).toEqualTypeOf();
|
|
85
|
+
expect(data.goldenHeadsEaten).toBeGreaterThanOrEqual(0);
|
|
86
|
+
});
|
|
87
|
+
test('Pit Inventory', async () => {
|
|
88
|
+
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
90
|
+
// @ts-expect-error
|
|
91
|
+
const data = await client.getPlayer('3457688aa57c4d71ab9d22b04f9160db');
|
|
92
|
+
expect(data.stats.pit.getInventory).toBeDefined();
|
|
93
|
+
expectTypeOf(data.stats.pit.getInventory).toEqualTypeOf();
|
|
94
|
+
expect(data.stats.pit.getInventory).toBeInstanceOf(Function);
|
|
95
|
+
const pitInventory = await data.stats.pit.getInventory();
|
|
96
|
+
expect(pitInventory).toBeDefined();
|
|
97
|
+
pitInventory.forEach((item) => {
|
|
98
|
+
expect(item).toBeDefined();
|
|
99
|
+
expect(item).toBeInstanceOf(PitInventoryItem);
|
|
100
|
+
expectTypeOf(item).toEqualTypeOf();
|
|
101
|
+
expect(item.itemId).toBeDefined();
|
|
102
|
+
expectTypeOf(item.itemId).toEqualTypeOf();
|
|
103
|
+
expect(item.count).toBeDefined();
|
|
104
|
+
expectTypeOf(item.count).toEqualTypeOf();
|
|
105
|
+
expect(item.name).toBeDefined();
|
|
106
|
+
expectTypeOf(item.name).toEqualTypeOf();
|
|
107
|
+
expect(item.lore).toBeDefined();
|
|
108
|
+
expectTypeOf(item.lore).toEqualTypeOf();
|
|
109
|
+
expect(item.loreArray).toBeDefined();
|
|
110
|
+
expectTypeOf(item.loreArray).toEqualTypeOf();
|
|
111
|
+
expect(item.extraAttributes).toBeDefined();
|
|
112
|
+
expectTypeOf(item.extraAttributes).toEqualTypeOf();
|
|
113
|
+
});
|
|
114
|
+
expect(data.stats.pit.getEnterChest).toBeDefined();
|
|
115
|
+
expectTypeOf(data.stats.pit.getEnterChest).toEqualTypeOf();
|
|
116
|
+
expect(data.stats.pit.getEnterChest).toBeInstanceOf(Function);
|
|
117
|
+
const pitEnterChest = await data.stats.pit.getEnterChest();
|
|
118
|
+
expect(pitEnterChest).toBeDefined();
|
|
119
|
+
pitEnterChest.forEach((item) => {
|
|
120
|
+
expect(item).toBeDefined();
|
|
121
|
+
expect(item).toBeInstanceOf(PitInventoryItem);
|
|
122
|
+
expectTypeOf(item).toEqualTypeOf();
|
|
123
|
+
expect(item.itemId).toBeDefined();
|
|
124
|
+
expectTypeOf(item.itemId).toEqualTypeOf();
|
|
125
|
+
expect(item.count).toBeDefined();
|
|
126
|
+
expectTypeOf(item.count).toEqualTypeOf();
|
|
127
|
+
expect(item.name).toBeDefined();
|
|
128
|
+
expectTypeOf(item.name).toEqualTypeOf();
|
|
129
|
+
expect(item.lore).toBeDefined();
|
|
130
|
+
expectTypeOf(item.lore).toEqualTypeOf();
|
|
131
|
+
expect(item.loreArray).toBeDefined();
|
|
132
|
+
expectTypeOf(item.loreArray).toEqualTypeOf();
|
|
133
|
+
expect(item.extraAttributes).toBeDefined();
|
|
134
|
+
expectTypeOf(item.extraAttributes).toEqualTypeOf();
|
|
135
|
+
});
|
|
136
|
+
expect(data.stats.pit.getArmor).toBeDefined();
|
|
137
|
+
expectTypeOf(data.stats.pit.getArmor).toEqualTypeOf();
|
|
138
|
+
expect(data.stats.pit.getArmor).toBeInstanceOf(Function);
|
|
139
|
+
const pitArmor = await data.stats.pit.getArmor();
|
|
140
|
+
expect(pitArmor).toBeDefined();
|
|
141
|
+
expectTypeOf(pitArmor).toEqualTypeOf();
|
|
142
|
+
expect(pitArmor.helmet).toBeDefined();
|
|
143
|
+
expectTypeOf(pitArmor.helmet).toEqualTypeOf();
|
|
144
|
+
if (null !== pitArmor.helmet) {
|
|
145
|
+
expect(pitArmor.helmet).toBeDefined();
|
|
146
|
+
expect(pitArmor.helmet).toBeInstanceOf(PitInventoryItem);
|
|
147
|
+
expectTypeOf(pitArmor.helmet).toEqualTypeOf();
|
|
148
|
+
expect(pitArmor.helmet.itemId).toBeDefined();
|
|
149
|
+
expectTypeOf(pitArmor.helmet.itemId).toEqualTypeOf();
|
|
150
|
+
expect(pitArmor.helmet.count).toBeDefined();
|
|
151
|
+
expectTypeOf(pitArmor.helmet.count).toEqualTypeOf();
|
|
152
|
+
expect(pitArmor.helmet.name).toBeDefined();
|
|
153
|
+
expectTypeOf(pitArmor.helmet.name).toEqualTypeOf();
|
|
154
|
+
expect(pitArmor.helmet.lore).toBeDefined();
|
|
155
|
+
expectTypeOf(pitArmor.helmet.lore).toEqualTypeOf();
|
|
156
|
+
expect(pitArmor.helmet.loreArray).toBeDefined();
|
|
157
|
+
expectTypeOf(pitArmor.helmet.loreArray).toEqualTypeOf();
|
|
158
|
+
expect(pitArmor.helmet.extraAttributes).toBeDefined();
|
|
159
|
+
expectTypeOf(pitArmor.helmet.extraAttributes).toEqualTypeOf();
|
|
160
|
+
}
|
|
161
|
+
expect(pitArmor.chestplate).toBeDefined();
|
|
162
|
+
expectTypeOf(pitArmor.chestplate).toEqualTypeOf();
|
|
163
|
+
if (null !== pitArmor.chestplate) {
|
|
164
|
+
expect(pitArmor.chestplate).toBeDefined();
|
|
165
|
+
expect(pitArmor.chestplate).toBeInstanceOf(PitInventoryItem);
|
|
166
|
+
expectTypeOf(pitArmor.chestplate).toEqualTypeOf();
|
|
167
|
+
expect(pitArmor.chestplate.itemId).toBeDefined();
|
|
168
|
+
expectTypeOf(pitArmor.chestplate.itemId).toEqualTypeOf();
|
|
169
|
+
expect(pitArmor.chestplate.count).toBeDefined();
|
|
170
|
+
expectTypeOf(pitArmor.chestplate.count).toEqualTypeOf();
|
|
171
|
+
expect(pitArmor.chestplate.name).toBeDefined();
|
|
172
|
+
expectTypeOf(pitArmor.chestplate.name).toEqualTypeOf();
|
|
173
|
+
expect(pitArmor.chestplate.lore).toBeDefined();
|
|
174
|
+
expectTypeOf(pitArmor.chestplate.lore).toEqualTypeOf();
|
|
175
|
+
expect(pitArmor.chestplate.loreArray).toBeDefined();
|
|
176
|
+
expectTypeOf(pitArmor.chestplate.loreArray).toEqualTypeOf();
|
|
177
|
+
expect(pitArmor.chestplate.extraAttributes).toBeDefined();
|
|
178
|
+
expectTypeOf(pitArmor.chestplate.extraAttributes).toEqualTypeOf();
|
|
179
|
+
}
|
|
180
|
+
expect(pitArmor.leggings).toBeDefined();
|
|
181
|
+
expectTypeOf(pitArmor.leggings).toEqualTypeOf();
|
|
182
|
+
if (null !== pitArmor.leggings) {
|
|
183
|
+
expect(pitArmor.leggings).toBeDefined();
|
|
184
|
+
expect(pitArmor.leggings).toBeInstanceOf(PitInventoryItem);
|
|
185
|
+
expectTypeOf(pitArmor.leggings).toEqualTypeOf();
|
|
186
|
+
expect(pitArmor.leggings.itemId).toBeDefined();
|
|
187
|
+
expectTypeOf(pitArmor.leggings.itemId).toEqualTypeOf();
|
|
188
|
+
expect(pitArmor.leggings.count).toBeDefined();
|
|
189
|
+
expectTypeOf(pitArmor.leggings.count).toEqualTypeOf();
|
|
190
|
+
expect(pitArmor.leggings.name).toBeDefined();
|
|
191
|
+
expectTypeOf(pitArmor.leggings.name).toEqualTypeOf();
|
|
192
|
+
expect(pitArmor.leggings.lore).toBeDefined();
|
|
193
|
+
expectTypeOf(pitArmor.leggings.lore).toEqualTypeOf();
|
|
194
|
+
expect(pitArmor.leggings.loreArray).toBeDefined();
|
|
195
|
+
expectTypeOf(pitArmor.leggings.loreArray).toEqualTypeOf();
|
|
196
|
+
expect(pitArmor.leggings.extraAttributes).toBeDefined();
|
|
197
|
+
expectTypeOf(pitArmor.leggings.extraAttributes).toEqualTypeOf();
|
|
198
|
+
}
|
|
199
|
+
expect(pitArmor.boots).toBeDefined();
|
|
200
|
+
expectTypeOf(pitArmor.boots).toEqualTypeOf();
|
|
201
|
+
if (null !== pitArmor.boots) {
|
|
202
|
+
expect(pitArmor.boots).toBeDefined();
|
|
203
|
+
expect(pitArmor.boots).toBeInstanceOf(PitInventoryItem);
|
|
204
|
+
expectTypeOf(pitArmor.boots).toEqualTypeOf();
|
|
205
|
+
expect(pitArmor.boots.itemId).toBeDefined();
|
|
206
|
+
expectTypeOf(pitArmor.boots.itemId).toEqualTypeOf();
|
|
207
|
+
expect(pitArmor.boots.count).toBeDefined();
|
|
208
|
+
expectTypeOf(pitArmor.boots.count).toEqualTypeOf();
|
|
209
|
+
expect(pitArmor.boots.name).toBeDefined();
|
|
210
|
+
expectTypeOf(pitArmor.boots.name).toEqualTypeOf();
|
|
211
|
+
expect(pitArmor.boots.lore).toBeDefined();
|
|
212
|
+
expectTypeOf(pitArmor.boots.lore).toEqualTypeOf();
|
|
213
|
+
expect(pitArmor.boots.loreArray).toBeDefined();
|
|
214
|
+
expectTypeOf(pitArmor.boots.loreArray).toEqualTypeOf();
|
|
215
|
+
expect(pitArmor.boots.extraAttributes).toBeDefined();
|
|
216
|
+
expectTypeOf(pitArmor.boots.extraAttributes).toEqualTypeOf();
|
|
217
|
+
}
|
|
218
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class PitInventoryItem {
|
|
2
|
+
itemId;
|
|
3
|
+
count;
|
|
4
|
+
name;
|
|
5
|
+
lore;
|
|
6
|
+
loreArray;
|
|
7
|
+
extraAttributes;
|
|
8
|
+
constructor(data) {
|
|
9
|
+
this.itemId = data?.id || 0;
|
|
10
|
+
this.count = data?.Count || 0;
|
|
11
|
+
this.name = data?.tag?.display?.Name
|
|
12
|
+
? data?.tag?.display?.Name?.toString().replace(/§([1-9]|[a-f])|§/gm, '')
|
|
13
|
+
: null;
|
|
14
|
+
this.lore = data?.tag?.display?.Lore ? data?.tag?.display?.Lore?.join('\n') : null;
|
|
15
|
+
this.loreArray = data?.tag?.display?.Lore ?? [];
|
|
16
|
+
this.extraAttributes = data?.tag?.ExtraAttributes ?? null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export default PitInventoryItem;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import divide from '../../utils/divide';
|
|
2
|
+
export class QuakecraftMode {
|
|
3
|
+
wins;
|
|
4
|
+
kills;
|
|
5
|
+
deaths;
|
|
6
|
+
KDR;
|
|
7
|
+
killstreaks;
|
|
8
|
+
distanceTravelled;
|
|
9
|
+
shotsFired;
|
|
10
|
+
headshots;
|
|
11
|
+
constructor(data, gamemode) {
|
|
12
|
+
if (gamemode)
|
|
13
|
+
gamemode = `_${gamemode}`;
|
|
14
|
+
this.wins = data?.[`wins${gamemode}`] || 0;
|
|
15
|
+
this.kills = data?.[`kills${gamemode}`] || 0;
|
|
16
|
+
this.deaths = data?.[`deaths${gamemode}`] || 0;
|
|
17
|
+
this.KDR = divide(this.kills, this.deaths);
|
|
18
|
+
this.killstreaks = data?.[`killstreaks${gamemode}`] || 0;
|
|
19
|
+
this.distanceTravelled = data?.[`distance_travelled${gamemode}`] || 0;
|
|
20
|
+
this.shotsFired = data?.[`shots_fired${gamemode}`] || 0;
|
|
21
|
+
this.headshots = data?.[`headshots${gamemode}`] || 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class Quakecraft {
|
|
25
|
+
coins;
|
|
26
|
+
solo;
|
|
27
|
+
teams;
|
|
28
|
+
wins;
|
|
29
|
+
kills;
|
|
30
|
+
deaths;
|
|
31
|
+
KDR;
|
|
32
|
+
killstreaks;
|
|
33
|
+
distanceTravelled;
|
|
34
|
+
shotsFired;
|
|
35
|
+
headshots;
|
|
36
|
+
instantRespawn;
|
|
37
|
+
killPrefixColor;
|
|
38
|
+
showPrefix;
|
|
39
|
+
killSound;
|
|
40
|
+
barrel;
|
|
41
|
+
case;
|
|
42
|
+
muzzle;
|
|
43
|
+
sight;
|
|
44
|
+
trigger;
|
|
45
|
+
constructor(data) {
|
|
46
|
+
this.coins = data?.coins || 0;
|
|
47
|
+
this.solo = new QuakecraftMode(data);
|
|
48
|
+
this.teams = new QuakecraftMode(data, 'teams');
|
|
49
|
+
this.wins = this.solo?.wins + this.teams?.wins;
|
|
50
|
+
this.kills = this.solo?.kills + this.teams?.kills;
|
|
51
|
+
this.deaths = this.solo?.deaths + this.teams?.deaths;
|
|
52
|
+
this.KDR = divide(this.kills, this.deaths);
|
|
53
|
+
this.killstreaks = this.solo?.killstreaks + this.teams?.killstreaks;
|
|
54
|
+
this.distanceTravelled = this.solo?.distanceTravelled + this.teams?.distanceTravelled;
|
|
55
|
+
this.shotsFired = this.solo?.shotsFired + this.teams?.shotsFired;
|
|
56
|
+
this.headshots = this.solo?.headshots + this.teams?.headshots;
|
|
57
|
+
this.instantRespawn = data?.instantRespawn || false;
|
|
58
|
+
this.killPrefixColor = data?.selectedKillPrefix || '';
|
|
59
|
+
this.showPrefix = data?.showKillPrefix || false;
|
|
60
|
+
this.killSound = data?.killsound || '';
|
|
61
|
+
this.barrel = data?.barrel || '';
|
|
62
|
+
this.case = data?.case || '';
|
|
63
|
+
this.muzzle = data?.muzzle || '';
|
|
64
|
+
this.sight = data?.sight || '';
|
|
65
|
+
this.trigger = data?.trigger || '';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export default Quakecraft;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import Quakecraft from './Quakecraft';
|
|
2
|
+
import { expect, expectTypeOf, test } from 'vitest';
|
|
3
|
+
test('Quakecraft', () => {
|
|
4
|
+
const data = new Quakecraft({ stats: 'meow' });
|
|
5
|
+
expect(data).toBeDefined();
|
|
6
|
+
expect(data).toBeInstanceOf(Quakecraft);
|
|
7
|
+
expectTypeOf(data).toEqualTypeOf();
|
|
8
|
+
expect(data.coins).toBeDefined();
|
|
9
|
+
expect(data.coins).greaterThanOrEqual(0);
|
|
10
|
+
expectTypeOf(data.coins).toEqualTypeOf();
|
|
11
|
+
expect(data.solo).toBeDefined();
|
|
12
|
+
expectTypeOf(data.solo).toEqualTypeOf();
|
|
13
|
+
expect(data.solo.wins).toBeDefined();
|
|
14
|
+
expect(data.solo.wins).greaterThanOrEqual(0);
|
|
15
|
+
expectTypeOf(data.solo.wins).toEqualTypeOf();
|
|
16
|
+
expect(data.solo.kills).toBeDefined();
|
|
17
|
+
expect(data.solo.kills).greaterThanOrEqual(0);
|
|
18
|
+
expectTypeOf(data.solo.kills).toEqualTypeOf();
|
|
19
|
+
expect(data.solo.deaths).toBeDefined();
|
|
20
|
+
expect(data.solo.deaths).greaterThanOrEqual(0);
|
|
21
|
+
expectTypeOf(data.solo.deaths).toEqualTypeOf();
|
|
22
|
+
expect(data.solo.KDR).toBeDefined();
|
|
23
|
+
expect(data.solo.KDR).greaterThanOrEqual(0);
|
|
24
|
+
expectTypeOf(data.solo.KDR).toEqualTypeOf();
|
|
25
|
+
expect(data.solo.killstreaks).toBeDefined();
|
|
26
|
+
expect(data.solo.killstreaks).greaterThanOrEqual(0);
|
|
27
|
+
expectTypeOf(data.solo.killstreaks).toEqualTypeOf();
|
|
28
|
+
expect(data.solo.distanceTravelled).toBeDefined();
|
|
29
|
+
expect(data.solo.distanceTravelled).greaterThanOrEqual(0);
|
|
30
|
+
expectTypeOf(data.solo.distanceTravelled).toEqualTypeOf();
|
|
31
|
+
expect(data.solo.shotsFired).toBeDefined();
|
|
32
|
+
expect(data.solo.shotsFired).greaterThanOrEqual(0);
|
|
33
|
+
expectTypeOf(data.solo.shotsFired).toEqualTypeOf();
|
|
34
|
+
expect(data.solo.headshots).toBeDefined();
|
|
35
|
+
expect(data.solo.headshots).greaterThanOrEqual(0);
|
|
36
|
+
expectTypeOf(data.solo.headshots).toEqualTypeOf();
|
|
37
|
+
expect(data.teams).toBeDefined();
|
|
38
|
+
expectTypeOf(data.teams).toEqualTypeOf();
|
|
39
|
+
expect(data.teams.wins).toBeDefined();
|
|
40
|
+
expect(data.teams.wins).greaterThanOrEqual(0);
|
|
41
|
+
expectTypeOf(data.teams.wins).toEqualTypeOf();
|
|
42
|
+
expect(data.teams.kills).toBeDefined();
|
|
43
|
+
expect(data.teams.kills).greaterThanOrEqual(0);
|
|
44
|
+
expectTypeOf(data.teams.kills).toEqualTypeOf();
|
|
45
|
+
expect(data.teams.deaths).toBeDefined();
|
|
46
|
+
expect(data.teams.deaths).greaterThanOrEqual(0);
|
|
47
|
+
expectTypeOf(data.teams.deaths).toEqualTypeOf();
|
|
48
|
+
expect(data.teams.KDR).toBeDefined();
|
|
49
|
+
expect(data.teams.KDR).greaterThanOrEqual(0);
|
|
50
|
+
expectTypeOf(data.teams.KDR).toEqualTypeOf();
|
|
51
|
+
expect(data.teams.killstreaks).toBeDefined();
|
|
52
|
+
expect(data.teams.killstreaks).greaterThanOrEqual(0);
|
|
53
|
+
expectTypeOf(data.teams.killstreaks).toEqualTypeOf();
|
|
54
|
+
expect(data.teams.distanceTravelled).toBeDefined();
|
|
55
|
+
expect(data.teams.distanceTravelled).greaterThanOrEqual(0);
|
|
56
|
+
expectTypeOf(data.teams.distanceTravelled).toEqualTypeOf();
|
|
57
|
+
expect(data.teams.shotsFired).toBeDefined();
|
|
58
|
+
expect(data.teams.shotsFired).greaterThanOrEqual(0);
|
|
59
|
+
expectTypeOf(data.teams.shotsFired).toEqualTypeOf();
|
|
60
|
+
expect(data.teams.headshots).toBeDefined();
|
|
61
|
+
expect(data.teams.headshots).greaterThanOrEqual(0);
|
|
62
|
+
expectTypeOf(data.teams.headshots).toEqualTypeOf();
|
|
63
|
+
expect(data.wins).toBeDefined();
|
|
64
|
+
expect(data.wins).greaterThanOrEqual(0);
|
|
65
|
+
expectTypeOf(data.wins).toEqualTypeOf();
|
|
66
|
+
expect(data.kills).toBeDefined();
|
|
67
|
+
expect(data.kills).greaterThanOrEqual(0);
|
|
68
|
+
expectTypeOf(data.kills).toEqualTypeOf();
|
|
69
|
+
expect(data.deaths).toBeDefined();
|
|
70
|
+
expect(data.deaths).greaterThanOrEqual(0);
|
|
71
|
+
expectTypeOf(data.deaths).toEqualTypeOf();
|
|
72
|
+
expect(data.KDR).toBeDefined();
|
|
73
|
+
expect(data.KDR).greaterThanOrEqual(0);
|
|
74
|
+
expectTypeOf(data.KDR).toEqualTypeOf();
|
|
75
|
+
expect(data.killstreaks).toBeDefined();
|
|
76
|
+
expect(data.killstreaks).greaterThanOrEqual(0);
|
|
77
|
+
expectTypeOf(data.killstreaks).toEqualTypeOf();
|
|
78
|
+
expect(data.distanceTravelled).toBeDefined();
|
|
79
|
+
expect(data.distanceTravelled).greaterThanOrEqual(0);
|
|
80
|
+
expectTypeOf(data.distanceTravelled).toEqualTypeOf();
|
|
81
|
+
expect(data.shotsFired).toBeDefined();
|
|
82
|
+
expect(data.shotsFired).greaterThanOrEqual(0);
|
|
83
|
+
expectTypeOf(data.shotsFired).toEqualTypeOf();
|
|
84
|
+
expect(data.headshots).toBeDefined();
|
|
85
|
+
expect(data.headshots).greaterThanOrEqual(0);
|
|
86
|
+
expectTypeOf(data.headshots).toEqualTypeOf();
|
|
87
|
+
expect(data.instantRespawn).toBeDefined();
|
|
88
|
+
expectTypeOf(data.instantRespawn).toEqualTypeOf();
|
|
89
|
+
expect(data.killPrefixColor).toBeDefined();
|
|
90
|
+
expectTypeOf(data.killPrefixColor).toEqualTypeOf();
|
|
91
|
+
expect(data.showPrefix).toBeDefined();
|
|
92
|
+
expectTypeOf(data.showPrefix).toEqualTypeOf();
|
|
93
|
+
expect(data.killSound).toBeDefined();
|
|
94
|
+
expectTypeOf(data.killSound).toEqualTypeOf();
|
|
95
|
+
expect(data.barrel).toBeDefined();
|
|
96
|
+
expectTypeOf(data.barrel).toEqualTypeOf();
|
|
97
|
+
expect(data.case).toBeDefined();
|
|
98
|
+
expectTypeOf(data.case).toEqualTypeOf();
|
|
99
|
+
expect(data.muzzle).toBeDefined();
|
|
100
|
+
expectTypeOf(data.muzzle).toEqualTypeOf();
|
|
101
|
+
expect(data.sight).toBeDefined();
|
|
102
|
+
expectTypeOf(data.sight).toEqualTypeOf();
|
|
103
|
+
expect(data.trigger).toBeDefined();
|
|
104
|
+
expectTypeOf(data.trigger).toEqualTypeOf();
|
|
105
|
+
});
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import divide from '../../utils/divide';
|
|
2
|
+
import { removeSnakeCaseString } from '../../utils/removeSnakeCase';
|
|
3
|
+
function getSkyWarsPrestige(level) {
|
|
4
|
+
if (60 <= level)
|
|
5
|
+
return 'Mythic';
|
|
6
|
+
return (['Iron', 'Iron', 'Gold', 'Diamond', 'Emerald', 'Sapphire', 'Ruby', 'Crystal', 'Opal', 'Amethyst', 'Rainbow'][Math.floor(level / 5)] || 'Iron');
|
|
7
|
+
}
|
|
8
|
+
function getSkyWarsLevel(xp) {
|
|
9
|
+
const totalXp = [0, 2, 7, 15, 25, 50, 100, 200, 350, 600, 1000, 1500];
|
|
10
|
+
if (0 === xp)
|
|
11
|
+
return 0;
|
|
12
|
+
if (15000 <= xp)
|
|
13
|
+
return Math.floor((xp - 15000) / 10000 + 12);
|
|
14
|
+
const level = totalXp.findIndex((x) => 0 < x * 10 - xp);
|
|
15
|
+
return -1 === level ? 0 : level;
|
|
16
|
+
}
|
|
17
|
+
function getSkyWarsLevelProgress(xp) {
|
|
18
|
+
const totalXp = [0, 2, 7, 15, 25, 50, 100, 200, 350, 600, 1000, 1500];
|
|
19
|
+
const xpToNextLvl = [0, 2, 5, 8, 10, 25, 50, 100, 150, 250, 400, 500];
|
|
20
|
+
let percent;
|
|
21
|
+
let xpToNextLevel;
|
|
22
|
+
let currentLevelXp = xp;
|
|
23
|
+
if (15000 <= xp) {
|
|
24
|
+
currentLevelXp -= 15000;
|
|
25
|
+
if (0 === currentLevelXp)
|
|
26
|
+
return { currentLevelXp: 0, xpToNextLevel: 10000, percent: 0, xpNextLevel: 10000 };
|
|
27
|
+
if (10000 < currentLevelXp) {
|
|
28
|
+
do {
|
|
29
|
+
currentLevelXp -= 10000;
|
|
30
|
+
} while (10000 <= currentLevelXp);
|
|
31
|
+
}
|
|
32
|
+
xpToNextLevel = 10000 - currentLevelXp;
|
|
33
|
+
percent = Math.round(currentLevelXp) / 100;
|
|
34
|
+
const percentRemaining = Math.round((100 - percent) * 100) / 100;
|
|
35
|
+
return { currentLevelXp, xpToNextLevel, percent, xpNextLevel: 10000, percentRemaining };
|
|
36
|
+
}
|
|
37
|
+
const totalXptoNextLevel = xpToNextLvl[totalXp.findIndex((x) => 0 < x * 10 - xp)] * 10;
|
|
38
|
+
for (let i = 0; i < xpToNextLvl.length; i++) {
|
|
39
|
+
if (0 > currentLevelXp - xpToNextLvl[i] * 10)
|
|
40
|
+
break;
|
|
41
|
+
currentLevelXp -= xpToNextLvl[i] * 10;
|
|
42
|
+
}
|
|
43
|
+
xpToNextLevel = totalXptoNextLevel - currentLevelXp;
|
|
44
|
+
percent = Math.round((currentLevelXp / totalXptoNextLevel) * 10000) / 100;
|
|
45
|
+
return { currentLevelXp, xpToNextLevel, percent, xpNextLevel: totalXptoNextLevel };
|
|
46
|
+
}
|
|
47
|
+
export class SkywarsMode {
|
|
48
|
+
kills;
|
|
49
|
+
deaths;
|
|
50
|
+
KDR;
|
|
51
|
+
wins;
|
|
52
|
+
losses;
|
|
53
|
+
WLR;
|
|
54
|
+
constructor(data, gamemode) {
|
|
55
|
+
this.kills = data?.[`kills_${gamemode}`] || 0;
|
|
56
|
+
this.deaths = data?.[`deaths_${gamemode}`] || 0;
|
|
57
|
+
this.KDR = divide(data?.kills, data?.deaths);
|
|
58
|
+
this.wins = data?.[`wins_${gamemode}`] || 0;
|
|
59
|
+
this.losses = data?.[`losses_${gamemode}`] || 0;
|
|
60
|
+
this.WLR = divide(data?.wins, data?.losses);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export class SkywarsModeStats {
|
|
64
|
+
activeKit;
|
|
65
|
+
killstreak;
|
|
66
|
+
kills;
|
|
67
|
+
voidKills;
|
|
68
|
+
meleeKills;
|
|
69
|
+
bowKills;
|
|
70
|
+
mobKills;
|
|
71
|
+
assists;
|
|
72
|
+
deaths;
|
|
73
|
+
KDR;
|
|
74
|
+
wins;
|
|
75
|
+
losses;
|
|
76
|
+
WLR;
|
|
77
|
+
gamesPlayed;
|
|
78
|
+
survivedPlayers;
|
|
79
|
+
chestsOpened;
|
|
80
|
+
timePlayed;
|
|
81
|
+
shard;
|
|
82
|
+
longestBowShot;
|
|
83
|
+
arrowsShot;
|
|
84
|
+
arrowsHit;
|
|
85
|
+
bowAccuracy;
|
|
86
|
+
fastestWin;
|
|
87
|
+
heads;
|
|
88
|
+
normal;
|
|
89
|
+
insane;
|
|
90
|
+
constructor(data, gamemode) {
|
|
91
|
+
this.activeKit = data?.[`activeKit_${gamemode?.toUpperCase()}`] || '';
|
|
92
|
+
this.killstreak = data?.[`killstreak_${gamemode}`] || 0;
|
|
93
|
+
this.kills = data?.[`kills_${gamemode}`] || 0;
|
|
94
|
+
this.voidKills = data?.[`void_kills_${gamemode}`] || 0;
|
|
95
|
+
this.meleeKills = data?.[`melee_kills_${gamemode}`] || 0;
|
|
96
|
+
this.bowKills = data?.[`bow_kills_${gamemode}`] || 0;
|
|
97
|
+
this.mobKills = data?.[`mob_kills_${gamemode}`] || 0;
|
|
98
|
+
this.assists = data?.[`assists_${gamemode}`] || 0;
|
|
99
|
+
this.deaths = data?.[`deaths_${gamemode}`] || 0;
|
|
100
|
+
this.KDR = divide(data?.kills, data?.deaths);
|
|
101
|
+
this.wins = data?.[`wins_${gamemode}`] || 0;
|
|
102
|
+
this.losses = data?.[`losses_${gamemode}`] || 0;
|
|
103
|
+
this.WLR = divide(data?.wins, data?.losses);
|
|
104
|
+
this.gamesPlayed = data?.[`games_${gamemode}`] || 0;
|
|
105
|
+
this.survivedPlayers = data?.[`survived_players_${gamemode}`] || 0;
|
|
106
|
+
this.chestsOpened = data?.[`chests_opened_${gamemode}`] || 0;
|
|
107
|
+
this.timePlayed = data?.[`time_played_${gamemode}`] || 0;
|
|
108
|
+
this.shard = data?.[`shard_${gamemode}`] || 0;
|
|
109
|
+
this.longestBowShot = data?.[`longest_bow_shot_${gamemode}`] || 0;
|
|
110
|
+
this.arrowsShot = data?.[`arrows_shot_${gamemode}`] || 0;
|
|
111
|
+
this.arrowsHit = data?.[`arrows_hit_${gamemode}`] || 0;
|
|
112
|
+
this.bowAccuracy = divide(this.arrowsHit, this.arrowsShot);
|
|
113
|
+
this.fastestWin = data?.[`fastest_win_${gamemode}`] || 0;
|
|
114
|
+
this.heads = data?.[`heads_${gamemode}`] || 0;
|
|
115
|
+
this.insane = new SkywarsMode(data, `${gamemode}_insane`);
|
|
116
|
+
this.normal = new SkywarsMode(data, `${gamemode}_normal`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
class SkywarsKit {
|
|
120
|
+
kitData;
|
|
121
|
+
isKit;
|
|
122
|
+
gameMode;
|
|
123
|
+
kitType;
|
|
124
|
+
kitName;
|
|
125
|
+
constructor(kit) {
|
|
126
|
+
this.kitData = kit?.match(/^kit_([a-z]+)_([a-z]+)_([a-z]+)$/);
|
|
127
|
+
this.isKit = Boolean(this.kitData);
|
|
128
|
+
this.gameMode = this.kitData ? this.kitData?.[2] : '';
|
|
129
|
+
this.kitType = this.kitData ? this.kitData?.[1] : '';
|
|
130
|
+
this.kitName = removeSnakeCaseString(this.kitData ? this.kitData?.[3] : '');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
class SkywarsKits {
|
|
134
|
+
kits;
|
|
135
|
+
constructor(kits) {
|
|
136
|
+
this.kits = kits.map((kit) => new SkywarsKit(kit)).filter((kit) => kit?.isKit);
|
|
137
|
+
}
|
|
138
|
+
get(gameMode = '', type = '') {
|
|
139
|
+
return this.kits.filter((kit) => kit?.gameMode?.startsWith(gameMode) && kit?.kitType.startsWith(type));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
export class SkywarsPackages {
|
|
143
|
+
rawPackages;
|
|
144
|
+
cages;
|
|
145
|
+
kits;
|
|
146
|
+
achievements;
|
|
147
|
+
constructor(data) {
|
|
148
|
+
this.rawPackages = data;
|
|
149
|
+
this.cages = this.parseCages();
|
|
150
|
+
this.kits = new SkywarsKits(data);
|
|
151
|
+
this.achievements = this.rawPackages
|
|
152
|
+
?.map((pkg) => pkg?.match(/^([A-Za-z]+)_?achievement([0-9]?)$/))
|
|
153
|
+
?.filter((x) => x)
|
|
154
|
+
?.map((x) => x?.slice(1)?.join(''));
|
|
155
|
+
}
|
|
156
|
+
parseCages() {
|
|
157
|
+
return this.rawPackages
|
|
158
|
+
?.map((pkg) => pkg?.match(/^cage_([A-Za-z]+)-cage$/))
|
|
159
|
+
?.filter((x) => x)
|
|
160
|
+
?.map((x) => x[1]?.replace(/-[a-z]/g, (x) => x[1].toUpperCase()));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
class SkyWars {
|
|
164
|
+
coins;
|
|
165
|
+
souls;
|
|
166
|
+
tokens;
|
|
167
|
+
experience;
|
|
168
|
+
level;
|
|
169
|
+
levelProgress;
|
|
170
|
+
levelFormatted;
|
|
171
|
+
prestige;
|
|
172
|
+
opals;
|
|
173
|
+
avarice;
|
|
174
|
+
tenacity;
|
|
175
|
+
shards;
|
|
176
|
+
angelOfDeathLevel;
|
|
177
|
+
killstreak;
|
|
178
|
+
kills;
|
|
179
|
+
voidKills;
|
|
180
|
+
meleeKills;
|
|
181
|
+
bowKills;
|
|
182
|
+
mobKills;
|
|
183
|
+
assists;
|
|
184
|
+
deaths;
|
|
185
|
+
KDR;
|
|
186
|
+
wins;
|
|
187
|
+
losses;
|
|
188
|
+
WLR;
|
|
189
|
+
gamesPlayed;
|
|
190
|
+
survivedPlayers;
|
|
191
|
+
chestsOpened;
|
|
192
|
+
timePlayed;
|
|
193
|
+
shard;
|
|
194
|
+
longestBowShot;
|
|
195
|
+
arrowsShot;
|
|
196
|
+
arrowsHit;
|
|
197
|
+
bowAccuracy;
|
|
198
|
+
fastestWin;
|
|
199
|
+
heads;
|
|
200
|
+
blocksPlaced;
|
|
201
|
+
blocksBroken;
|
|
202
|
+
eggThrown;
|
|
203
|
+
enderpearlsThrown;
|
|
204
|
+
solo;
|
|
205
|
+
team;
|
|
206
|
+
mega;
|
|
207
|
+
megaDoubles;
|
|
208
|
+
lab;
|
|
209
|
+
packages;
|
|
210
|
+
constructor(data) {
|
|
211
|
+
this.coins = data?.coins || 0;
|
|
212
|
+
this.souls = data?.souls || 0;
|
|
213
|
+
this.tokens = data?.cosmetic_tokens || 0;
|
|
214
|
+
this.experience = data?.skywars_experience || 0;
|
|
215
|
+
this.level = getSkyWarsLevel(data?.skywars_experience);
|
|
216
|
+
this.levelProgress = getSkyWarsLevelProgress(data?.skywars_experience);
|
|
217
|
+
this.levelFormatted = data?.levelFormatted
|
|
218
|
+
? data?.levelFormatted
|
|
219
|
+
?.replace(/§l/gm, '**')
|
|
220
|
+
?.replace(/§([a-f]|[1-9])/gm, '')
|
|
221
|
+
?.replace(/§r/gm, '')
|
|
222
|
+
: null;
|
|
223
|
+
this.prestige = getSkyWarsPrestige(this.level);
|
|
224
|
+
this.opals = data?.opals || 0;
|
|
225
|
+
this.avarice = data?.avarice || 0;
|
|
226
|
+
this.tenacity = data?.tenacity || 0;
|
|
227
|
+
this.shards = data?.shard || 0;
|
|
228
|
+
this.angelOfDeathLevel = data?.angel_of_death_level || 0;
|
|
229
|
+
this.killstreak = data?.killstreak || 0;
|
|
230
|
+
this.kills = data?.kills || 0;
|
|
231
|
+
this.voidKills = data?.void_kills || 0;
|
|
232
|
+
this.meleeKills = data?.melee_kills || 0;
|
|
233
|
+
this.bowKills = data?.bow_kills || 0;
|
|
234
|
+
this.mobKills = data?.mob_kills || 0;
|
|
235
|
+
this.assists = data?.assists || 0;
|
|
236
|
+
this.deaths = data?.deaths || 0;
|
|
237
|
+
this.KDR = divide(data?.kills, data?.deaths);
|
|
238
|
+
this.wins = data?.wins || 0;
|
|
239
|
+
this.losses = data?.losses || 0;
|
|
240
|
+
this.WLR = divide(data?.wins, data?.losses);
|
|
241
|
+
this.gamesPlayed = data?.games || 0;
|
|
242
|
+
this.survivedPlayers = data?.survived_players || 0;
|
|
243
|
+
this.chestsOpened = data?.chests_opened || 0;
|
|
244
|
+
this.timePlayed = data?.time_played || 0;
|
|
245
|
+
this.shard = data?.shard || 0;
|
|
246
|
+
this.longestBowShot = data?.longest_bow_shot || 0;
|
|
247
|
+
this.arrowsShot = data?.arrows_shot || 0;
|
|
248
|
+
this.arrowsHit = data?.arrows_hit || 0;
|
|
249
|
+
this.bowAccuracy = divide(this.arrowsHit, this.arrowsShot);
|
|
250
|
+
this.fastestWin = data?.fastest_win || 0;
|
|
251
|
+
this.heads = data?.heads || 0;
|
|
252
|
+
this.blocksPlaced = data?.blocks_placed || 0;
|
|
253
|
+
this.blocksBroken = data?.blocks_broken || 0;
|
|
254
|
+
this.eggThrown = data?.egg_thrown || 0;
|
|
255
|
+
this.enderpearlsThrown = data?.enderpearls_thrown || 0;
|
|
256
|
+
this.solo = new SkywarsModeStats(data, 'solo');
|
|
257
|
+
this.team = new SkywarsModeStats(data, 'team');
|
|
258
|
+
this.mega = new SkywarsMode(data, 'mega');
|
|
259
|
+
this.megaDoubles = new SkywarsMode(data, 'mega_doubles');
|
|
260
|
+
this.lab = new SkywarsMode(data, 'lab');
|
|
261
|
+
this.packages = new SkywarsPackages(data?.packages || []);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
export default SkyWars;
|