mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Tweaked for readability.
This commit is contained in:
parent
621969459a
commit
8fdf4042bb
@ -19,6 +19,7 @@ import com.gmail.nossr50.skills.child.FamilyTree;
|
|||||||
public class PlayerProfile {
|
public class PlayerProfile {
|
||||||
private final String playerName;
|
private final String playerName;
|
||||||
private boolean loaded;
|
private boolean loaded;
|
||||||
|
private boolean changed;
|
||||||
|
|
||||||
/* HUDs */
|
/* HUDs */
|
||||||
private HudType hudType;
|
private HudType hudType;
|
||||||
@ -30,7 +31,6 @@ public class PlayerProfile {
|
|||||||
private final Map<SkillType, Integer> skills = new HashMap<SkillType, Integer>(); // Skill & Level
|
private final Map<SkillType, Integer> skills = new HashMap<SkillType, Integer>(); // Skill & Level
|
||||||
private final Map<SkillType, Float> skillsXp = new HashMap<SkillType, Float>(); // Skill & XP
|
private final Map<SkillType, Float> skillsXp = new HashMap<SkillType, Float>(); // Skill & XP
|
||||||
private final Map<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>(); // Ability & Cooldown
|
private final Map<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>(); // Ability & Cooldown
|
||||||
private boolean changed = false;
|
|
||||||
|
|
||||||
public PlayerProfile(String playerName) {
|
public PlayerProfile(String playerName) {
|
||||||
this.playerName = playerName;
|
this.playerName = playerName;
|
||||||
@ -70,10 +70,12 @@ public class PlayerProfile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
if (changed) {
|
if (!changed) {
|
||||||
mcMMO.getDatabaseManager().saveUser(this);
|
return;
|
||||||
changed = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mcMMO.getDatabaseManager().saveUser(this);
|
||||||
|
changed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPlayerName() {
|
public String getPlayerName() {
|
||||||
|
Loading…
Reference in New Issue
Block a user