From ae0cf692cdd9512e59c6d10897bf6466bda10585 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Tue, 23 Apr 2013 01:22:01 -0300 Subject: [PATCH] Use defaults when using defaults. --- .../com/gmail/nossr50/datatypes/player/PlayerProfile.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 79013b5d3..ae6fa304a 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -92,13 +92,13 @@ public class PlayerProfile { if (huds.get(1) == null) { DatabaseManager.write("INSERT INTO " + tablePrefix + "huds (user_id) VALUES (" + userId + ")"); + mobHealthbarType = Config.getInstance().getMobHealthbarDefault(); } else { hudType = HudType.valueOf(huds.get(1).get(0)); + mobHealthbarType = MobHealthbarType.valueOf(DatabaseManager.read("SELECT mobhealthbar FROM " + tablePrefix + "huds WHERE user_id = " + userId).get(1).get(0)); } - mobHealthbarType = MobHealthbarType.valueOf(DatabaseManager.read("SELECT mobhealthbar FROM " + tablePrefix + "huds WHERE user_id = " + userId).get(1).get(0)); - HashMap> cooldowns = DatabaseManager.read("SELECT mining, woodcutting, unarmed, herbalism, excavation, swords, axes, blast_mining FROM " + tablePrefix + "cooldowns WHERE user_id = " + userId); ArrayList cooldownValues = cooldowns.get(1);