mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-15 18:49:23 +02:00
Using doubles in most places again to avoid precision loss
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user