Skip to content

Commit 6c5891d

Browse files
committed
Update SkyWars.js
1 parent 77c5657 commit 6c5891d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/structures/MiniGames/SkyWars.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class SkyWars {
7777
* Experience
7878
* @type {number}
7979
*/
80-
this.experience = data.skywars_experience;
80+
this.experience = data.skywars_experience || 0;
8181
/**
8282
* Level
8383
* @type {number}
@@ -190,7 +190,7 @@ class SkyWars {
190190
* @type {SkyWarsTotalModeStats}
191191
*/
192192
this.ranked = {
193-
winstreak: data.winstreak_ranked,
193+
winstreak: data.winstreak_ranked || 0,
194194
playedGames: data.games_ranked || 0,
195195
kills: data.kills_ranked || 0,
196196
wins: data.wins_ranked || 0,
@@ -352,7 +352,8 @@ module.exports = SkyWars;
352352
* @return {string}
353353
*/
354354
function getSkyWarsPrestige (level) {
355-
return ['Iron', 'Iron', 'Gold', 'Diamond', 'Emerald', 'Sapphire', 'Ruby', 'Crystal', 'Opal', 'Amethyst', 'Rainbow'][Math.floor(level / 5)] || 'Mythic';
355+
if (level >= 60) return 'Mythic';
356+
return ['Iron', 'Iron', 'Gold', 'Diamond', 'Emerald', 'Sapphire', 'Ruby', 'Crystal', 'Opal', 'Amethyst', 'Rainbow'][Math.floor(level / 5)] || 'Iron';
356357
}
357358
/**
358359
* @param {number} xp

0 commit comments

Comments
 (0)