Using doubles in most places again to avoid precision loss

This commit is contained in:
nossr50
2019-06-04 21:12:10 -07:00
parent 32fa6cee96
commit fc6c6ed2c4
59 changed files with 382 additions and 351 deletions

View File

@@ -22,7 +22,7 @@ public class AddlevelsCommand extends ExperienceCommand {
@Override
protected void handleCommand(Player player, PlayerProfile profile, PrimarySkillType skill, int value) {
float xpRemoved = profile.getSkillXpLevelRaw(skill);
double xpRemoved = profile.getSkillXpLevelRaw(skill);
profile.addLevels(skill, value);
if (player == null) {

View File

@@ -23,7 +23,7 @@ public class MmoeditCommand extends ExperienceCommand {
@Override
protected void handleCommand(Player player, PlayerProfile profile, PrimarySkillType skill, int value) {
int skillLevel = profile.getSkillLevel(skill);
float xpRemoved = profile.getSkillXpLevelRaw(skill);
double xpRemoved = profile.getSkillXpLevelRaw(skill);
profile.modifySkill(skill, value);

View File

@@ -122,7 +122,7 @@ public class SkillresetCommand implements TabExecutor {
protected void handleCommand(Player player, PlayerProfile profile, PrimarySkillType skill) {
int levelsRemoved = profile.getSkillLevel(skill);
float xpRemoved = profile.getSkillXpLevelRaw(skill);
double xpRemoved = profile.getSkillXpLevelRaw(skill);
profile.modifySkill(skill, 0);