Added eslintrc config and updated all files to it

This commit is contained in:
2023-11-22 23:50:21 +01:00
parent 10771fd04e
commit 3d4fc1fccb
70 changed files with 1276 additions and 1234 deletions

View File

@@ -2,16 +2,16 @@
Code used from the slothpixel project https://github.com/slothpixel/core
*/
function skywarsLevel(xp) {
let xps = [0, 20, 70, 150, 250, 500, 1000, 2000, 3500, 6000, 10000, 15000];
let xps = [0, 20, 70, 150, 250, 500, 1000, 2000, 3500, 6000, 10000, 15000]
let exactLevel = 0
if (xp >= 15000) {
exactLevel = (xp - 15000) / 10000 + 12;
return exactLevel;
exactLevel = (xp - 15000) / 10000 + 12
return exactLevel
} else {
for (i = 0; i < xps.length; i++) {
if (xp < xps[i]) {
exactLevel = i + (xp - xps[i - 1]) / (xps[i] - xps[i - 1]);
return exactLevel;
exactLevel = i + (xp - xps[i - 1]) / (xps[i] - xps[i - 1])
return exactLevel
}
}
}