Do not save an un-loaded PlayerProfile

This commit is contained in:
riking 2013-10-05 16:02:34 -07:00
parent 0e41708897
commit 9542d7cd79

View File

@ -54,7 +54,7 @@ public class PlayerProfile {
* Calling this constructor is considered loading the profile.
*/
public PlayerProfile(String playerName, Map<SkillType, Integer> argSkills, Map<SkillType, Float> argSkillsXp, Map<AbilityType, Integer> argSkillsDats, MobHealthbarType mobHealthbarType) {
this(playerName, true);
this(playerName);
this.mobHealthbarType = mobHealthbarType;
@ -66,7 +66,7 @@ public class PlayerProfile {
}
public void save() {
if (!changed) {
if (!changed || !loaded) {
return;
}