Use defaults when using defaults.

This commit is contained in:
t00thpick1 2013-04-23 01:22:01 -03:00
parent 2ca7d139fe
commit ae0cf692cd

View File

@ -92,12 +92,12 @@ public class PlayerProfile {
if (huds.get(1) == null) { if (huds.get(1) == null) {
DatabaseManager.write("INSERT INTO " + tablePrefix + "huds (user_id) VALUES (" + userId + ")"); DatabaseManager.write("INSERT INTO " + tablePrefix + "huds (user_id) VALUES (" + userId + ")");
mobHealthbarType = Config.getInstance().getMobHealthbarDefault();
} }
else { else {
hudType = HudType.valueOf(huds.get(1).get(0)); 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<Integer, ArrayList<String>> cooldowns = DatabaseManager.read("SELECT mining, woodcutting, unarmed, herbalism, excavation, swords, axes, blast_mining FROM " + tablePrefix + "cooldowns WHERE user_id = " + userId); HashMap<Integer, ArrayList<String>> cooldowns = DatabaseManager.read("SELECT mining, woodcutting, unarmed, herbalism, excavation, swords, axes, blast_mining FROM " + tablePrefix + "cooldowns WHERE user_id = " + userId);
ArrayList<String> cooldownValues = cooldowns.get(1); ArrayList<String> cooldownValues = cooldowns.get(1);