Don't need to .save() for online players

This commit is contained in:
bm01 2012-07-07 20:02:54 +02:00
parent ede08ce5ac
commit 3702495038

View File

@ -88,6 +88,7 @@ public class MmoeditCommand implements CommandExecutor {
if (mcmmoPlayer != null) {
profile = mcmmoPlayer.getProfile();
profile.modifySkill(skill, newValue);
mcmmoPlayer.getPlayer().sendMessage(ChatColor.GREEN + "Your level in " + skillName + " was set to " + newValue + "!"); //TODO: Needs more locale.
sender.sendMessage(ChatColor.RED + skillName + " has been modified for " + args[0] + "."); //TODO: Use locale
}
@ -98,10 +99,9 @@ public class MmoeditCommand implements CommandExecutor {
sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist"));
return true;
}
}
profile.modifySkill(skill, newValue);
profile.save();
profile.save();
}
return true;
default: