diff --git a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java index 635a60d5c..03cb57d26 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java @@ -307,13 +307,11 @@ public class PlayerProfile { } public void save() { - save(true); - } - - public void save(boolean override) { Long timestamp = System.currentTimeMillis(); - if (timestamp < (lastSave + ((long) Config.getInstance().getSaveInterval() * 60000)) && !override) + + if (timestamp < (lastSave + ((long) Config.getInstance().getSaveInterval() * 60000))) { return; + } // If we are using mysql save to database if (Config.getInstance().getUseMySQL()) { @@ -944,12 +942,10 @@ public class PlayerProfile { public void setSkillXpLevel(SkillType skillType, int newValue) { skillsXp.put(skillType, newValue); - save(false); } public void skillUp(SkillType skillType, int newValue) { skills.put(skillType, skills.get(skillType) + newValue); - save(false); } // /** @@ -1069,7 +1065,6 @@ public class PlayerProfile { else { skillsXp.put(skillType, skillsXp.get(skillType) - xp); } - save(false); } /** @@ -1097,7 +1092,6 @@ public class PlayerProfile { skills.put(skillType, newValue); skillsXp.put(skillType, 0); } - save(false); } /** @@ -1125,7 +1119,6 @@ public class PlayerProfile { skills.put(skillType, skills.get(skillType) + levels); skillsXp.put(skillType, 0); } - save(false); } /** @@ -1204,7 +1197,6 @@ public class PlayerProfile { public void setParty(Party party) { this.party = party; - save(false); } public Party getParty() { @@ -1221,7 +1213,6 @@ public class PlayerProfile { public void removeParty() { party = null; - save(false); } public void removeInvite() {