hypixel-api-reborn 11.2.1 → 11.3.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.
Files changed (37) hide show
  1. package/package.json +8 -8
  2. package/src/API/housing/getActiveHouses.js +7 -0
  3. package/src/API/housing/getHouse.js +9 -0
  4. package/src/API/housing/getPlayerHouses.js +11 -0
  5. package/src/API/index.js +6 -1
  6. package/src/API/skyblock/getGarden.js +7 -0
  7. package/src/API/skyblock/getMember.js +4 -2
  8. package/src/API/skyblock/getProfiles.js +4 -2
  9. package/src/Client.js +46 -2
  10. package/src/Private/requests.js +1 -1
  11. package/src/index.js +5 -0
  12. package/src/structures/House.js +54 -0
  13. package/src/structures/MiniGames/Arcade.js +754 -270
  14. package/src/structures/MiniGames/ArenaBrawl.js +97 -31
  15. package/src/structures/MiniGames/BlitzSurvivalGames.js +378 -127
  16. package/src/structures/MiniGames/BuildBattle.js +19 -8
  17. package/src/structures/MiniGames/CopsAndCrims.js +252 -25
  18. package/src/structures/MiniGames/Duels.js +899 -656
  19. package/src/structures/MiniGames/MegaWalls.js +390 -51
  20. package/src/structures/MiniGames/MurderMystery.js +151 -30
  21. package/src/structures/MiniGames/Paintball.js +31 -11
  22. package/src/structures/MiniGames/Quakecraft.js +113 -50
  23. package/src/structures/MiniGames/SkyWars.js +340 -195
  24. package/src/structures/MiniGames/SmashHeroes.js +195 -69
  25. package/src/structures/MiniGames/SpeedUHC.js +76 -36
  26. package/src/structures/MiniGames/TNTGames.js +242 -73
  27. package/src/structures/MiniGames/TurboKartRacers.js +55 -115
  28. package/src/structures/MiniGames/UHC.js +135 -124
  29. package/src/structures/MiniGames/VampireZ.js +70 -37
  30. package/src/structures/MiniGames/Warlords.js +126 -1
  31. package/src/structures/MiniGames/WoolWars.js +54 -4
  32. package/src/structures/Player.js +30 -24
  33. package/src/structures/SkyBlock/SkyblockGarden.js +146 -0
  34. package/src/structures/SkyBlock/SkyblockMember.js +12 -5
  35. package/src/utils/Constants.js +507 -5
  36. package/src/utils/SkyblockUtils.js +33 -0
  37. package/typings/index.d.ts +911 -802
@@ -32,16 +32,6 @@ class Paintball {
32
32
  * @type {number}
33
33
  */
34
34
  this.wins = data.wins || 0;
35
- /**
36
- * Losses
37
- * @type {number}
38
- */
39
- this.losses = data.losses || 0;
40
- /**
41
- * Win Loss ratio
42
- * @type {number}
43
- */
44
- this.WLRatio = divide(this.wins, this.losses);
45
35
  /**
46
36
  * Shots fired
47
37
  * @type {number}
@@ -56,12 +46,42 @@ class Paintball {
56
46
  * Forcefield Time
57
47
  * @type {number}
58
48
  */
59
- this.forcefieldTime = data.forcefieldTime || 0;
49
+ this.forceFieldTime = data.forcefieldTime || 0;
60
50
  /**
61
51
  * Hat
62
52
  * @type {string}
63
53
  */
64
54
  this.hat = data.hat || 'None';
55
+ /**
56
+ * Adrenaline Perk Level
57
+ * @type {number}
58
+ */
59
+ this.adrenaline = data.adrenaline || 0;
60
+ /**
61
+ * Endurance Perk Level
62
+ * @type {number}
63
+ */
64
+ this.endurance = data.endurance || 0;
65
+ /**
66
+ * Fortune Perk Level
67
+ * @type {number}
68
+ */
69
+ this.fortune = data.fortune || 0;
70
+ /**
71
+ * Godfather Perk Level
72
+ * @type {number}
73
+ */
74
+ this.godfather = data.godfather || 0;
75
+ /**
76
+ * Superluck Perk Level
77
+ * @type {number}
78
+ */
79
+ this.superluck = data.superluck || 0;
80
+ /**
81
+ * Transfusion Perk Level
82
+ * @type {number}
83
+ */
84
+ this.transfusion = data.transfusion || 0;
65
85
  }
66
86
  }
67
87
  module.exports = Paintball;
@@ -1,4 +1,55 @@
1
1
  const divide = require('../../utils/divide');
2
+
3
+ class QuakecraftMode {
4
+ /**
5
+ * @param {object} data Quakecraft data
6
+ * @param {string} gamemode Gamemode Name
7
+ */
8
+ constructor(data, gamemode) {
9
+ if (gamemode) gamemode = `_${gamemode}`;
10
+ /**
11
+ * Wins
12
+ * @type {number}
13
+ */
14
+ this.wins = data[`wins${gamemode}`] || 0;
15
+ /**
16
+ * Kills
17
+ * @type {number}
18
+ */
19
+ this.kills = data[`kills${gamemode}`] || 0;
20
+ /**
21
+ * Deaths
22
+ * @type {number}
23
+ */
24
+ this.deaths = data[`deaths${gamemode}`] || 0;
25
+ /**
26
+ * Kill Death ratio
27
+ * @type {number}
28
+ */
29
+ this.KDRatio = divide(this.kills, this.deaths);
30
+ /**
31
+ * Kill streaks
32
+ * @type {number}
33
+ */
34
+ this.killstreaks = data[`killstreaks${gamemode}`] || 0;
35
+ /**
36
+ * Distance travelled
37
+ * @type {number}
38
+ */
39
+ this.distanceTravelled = data[`distance_travelled${gamemode}`] || 0;
40
+ /**
41
+ * Shots fired
42
+ * @type {number}
43
+ */
44
+ this.shotsFired = data[`shots_fired${gamemode}`] || 0;
45
+ /**
46
+ * Headshots
47
+ * @type {number}
48
+ */
49
+ this.headshots = data[`headshots${gamemode}`] || 0;
50
+ }
51
+ }
52
+
2
53
  /**
3
54
  * Quakecraft class
4
55
  */
@@ -12,90 +63,102 @@ class Quakecraft {
12
63
  * @type {number}
13
64
  */
14
65
  this.coins = data.coins || 0;
66
+ /**
67
+ * Solo Quakecraft stats
68
+ * @type {QuakecraftMode}
69
+ */
70
+ this.solo = new QuakecraftMode(data);
71
+ /**
72
+ * Teams Quakecraft stats
73
+ * @type {QuakecraftMode}
74
+ */
75
+ this.teams = new QuakecraftMode(data, 'teams');
76
+ /**
77
+ * Wins
78
+ * @type {number}
79
+ */
80
+ this.wins = this.solo.wins + this.teams.wins;
15
81
  /**
16
82
  * Kills
17
83
  * @type {number}
18
84
  */
19
- this.kills = (data.kills || 0) + (data.kills_teams || 0);
85
+ this.kills = this.solo.kills + this.teams.kills;
20
86
  /**
21
87
  * Deaths
22
88
  * @type {number}
23
89
  */
24
- this.deaths = (data.deaths || 0) + (data.deaths_teams || 0);
90
+ this.deaths = this.solo.deaths + this.teams.deaths;
25
91
  /**
26
92
  * Kill Death ratio
27
93
  * @type {number}
28
94
  */
29
95
  this.KDRatio = divide(this.kills, this.deaths);
30
96
  /**
31
- * Wins
97
+ * Kill streaks
32
98
  * @type {number}
33
99
  */
34
- this.wins = (data.wins || 0) + (data.wins_teams || 0);
100
+ this.killstreaks = this.solo.killstreaks + this.teams.killstreaks;
35
101
  /**
36
102
  * Distance travelled
37
103
  * @type {number}
38
104
  */
39
- this.distanceTravelled = data.distance_travelled + data.distance_travelled_teams || 0;
105
+ this.distanceTravelled = this.solo.distanceTravelled + this.teams.distanceTravelled;
40
106
  /**
41
- * Headshots
107
+ * Shots fired
42
108
  * @type {number}
43
109
  */
44
- this.headshots = (data.headshots || 0) + (data.headshots_teams || 0);
110
+ this.shotsFired = this.solo.shotsFired + this.teams.shotsFired;
45
111
  /**
46
- * Shots fired
112
+ * Headshots
47
113
  * @type {number}
48
114
  */
49
- this.shotsFired = (data.shots_fired || 0) + (data.shots_fired_teams || 0);
115
+ this.headshots = this.solo.headshots + this.teams.headshots;
50
116
  /**
51
- * Kill streaks
52
- * @type {number}
117
+ * Instant Respawn
118
+ * @type {boolean}
53
119
  */
54
- this.killstreaks = (data.killstreaks || 0) + (data.killstreaks_teams || 0);
120
+ this.instantRespawn = data.instantRespawn || false;
55
121
  /**
56
- * Highest killstreak
57
- * @type {number}
122
+ * Kill Prefix Color
123
+ * @type {string}
124
+ */
125
+ this.killPrefixColor = data.selectedKillPrefix || '';
126
+ /**
127
+ * Show Prefix
128
+ * @type {boolean}
129
+ */
130
+ this.showPrefix = data.showKillPrefix || false;
131
+ /**
132
+ * Kill Sound
133
+ * @type {string}
58
134
  */
59
- this.highestKillstreak = data.highest_killstreak || 0;
135
+ this.killSound = data.killsound || '';
60
136
  /**
61
- * Solo
62
- * @type {QuakecraftModeStats}
137
+ * Barrel
138
+ * @type {string}
63
139
  */
64
- this.solo = {
65
- kills: data.kills || 0,
66
- deaths: data.deaths || 0,
67
- KDRatio: divide(data.kills, data.deaths),
68
- wins: data.wins || 0,
69
- distanceTravelled: data.distance_travelled || 0,
70
- headshots: data.headshots || 0,
71
- shotsFired: data.shots_fired || 0,
72
- killstreaks: data.killstreaks || 0
73
- };
140
+ this.barrel = data.barrel || '';
74
141
  /**
75
- * Teams
76
- * @type {QuakecraftModeStats}
142
+ * Case
143
+ * @type {string}
77
144
  */
78
- this.teams = {
79
- kills: data.kills_teams || 0,
80
- deaths: data.deaths_teams || 0,
81
- KDRatio: divide(data.kills_teams, data.deaths_teams),
82
- wins: data.wins_teams || 0,
83
- distanceTravelled: data.distance_travelled_teams || 0,
84
- headshots: data.headshots_teams || 0,
85
- shotsFired: data.shots_fired_teams || 0,
86
- killstreaks: data.killstreaks_teams || 0
87
- };
145
+ this.case = data.case || '';
146
+ /**
147
+ * Muzzle
148
+ * @type {string}
149
+ */
150
+ this.muzzle = data.muzzle || '';
151
+ /**
152
+ * Sight
153
+ * @type {string}
154
+ */
155
+ this.sight = data.sight || '';
156
+ /**
157
+ * Trigger
158
+ * @type {string}
159
+ */
160
+ this.trigger = data.trigger || '';
88
161
  }
89
162
  }
163
+
90
164
  module.exports = Quakecraft;
91
- /**
92
- * @typedef {object} QuakecraftModeStats
93
- * @property {number} kills Kills
94
- * @property {number} deaths Deaths
95
- * @property {number} KDRatio Kill Death ratio
96
- * @property {number} wins Wins
97
- * @property {number} distanceTravelled Distance travelled
98
- * @property {number} headshots Headshots
99
- * @property {number} killstreaks Killstreaks
100
- * @property {number} shotsFired Shots fired
101
- */