mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-09 13:19:13 +01:00
New exp calculations.
This commit is contained in:
parent
ab82f550cf
commit
80f001fdb7
@ -46,7 +46,15 @@ public class SetExpFix
|
||||
|
||||
private static int getExpToLevel(final int level)
|
||||
{
|
||||
return 7 + (level * 7 >> 1);
|
||||
if (level >= 30)
|
||||
{
|
||||
return 62 + (level - 30) * 7;
|
||||
}
|
||||
if (level >= 15)
|
||||
{
|
||||
return 17 + (level - 15) * 3;
|
||||
}
|
||||
return 17;
|
||||
}
|
||||
|
||||
//This method is required because the bukkit player.getTotalExperience() method, shows exp that has been 'spent'.
|
||||
@ -56,7 +64,8 @@ public class SetExpFix
|
||||
int exp = (int)Math.round(getExpToLevel(player) * player.getExp());
|
||||
int currentLevel = player.getLevel();
|
||||
|
||||
while (currentLevel > 0) {
|
||||
while (currentLevel > 0)
|
||||
{
|
||||
currentLevel--;
|
||||
exp += getExpToLevel(currentLevel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user