From 8fdf4042bbe9eddbe2ad1a54c155cd43d8539282 Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 11 Jul 2013 13:22:14 -0400 Subject: [PATCH] Tweaked for readability. --- .../gmail/nossr50/datatypes/player/PlayerProfile.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index b3c4d7813..2d140766a 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -19,6 +19,7 @@ import com.gmail.nossr50.skills.child.FamilyTree; public class PlayerProfile { private final String playerName; private boolean loaded; + private boolean changed; /* HUDs */ private HudType hudType; @@ -30,7 +31,6 @@ public class PlayerProfile { private final Map skills = new HashMap(); // Skill & Level private final Map skillsXp = new HashMap(); // Skill & XP private final Map skillsDATS = new HashMap(); // Ability & Cooldown - private boolean changed = false; public PlayerProfile(String playerName) { this.playerName = playerName; @@ -70,10 +70,12 @@ public class PlayerProfile { } public void save() { - if (changed) { - mcMMO.getDatabaseManager().saveUser(this); - changed = false; + if (!changed) { + return; } + + mcMMO.getDatabaseManager().saveUser(this); + changed = false; } public String getPlayerName() {