diff --git a/sqlupdates/3_5_0 to 4_0_0.sql b/sqlupdates/3_5_0 to 4_0_0.sql index c04dbb5d..baae309d 100644 --- a/sqlupdates/3_5_0 to 4_0_0.sql +++ b/sqlupdates/3_5_0 to 4_0_0.sql @@ -1,3 +1,6 @@ INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_changename.user_not_found', 'The Habbo %user% does not exist or is not online.'); INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_changename.done', 'Successfully toggled the name change for the Habbo %user%.'); -INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_changename.received', 'Hotel staff requests for you to change your name.\n Please click on your Habbo then click on the "Change Your Name" button.'); \ No newline at end of file +INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_changename.received', 'Hotel staff requests for you to change your name.\n Please click on your Habbo then click on the "Change Your Name" button.'); + +ALTER TABLE `achievements` +ADD `visible` enum('0','1') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1' COMMENT 'Is the achievement in use and/or obtainable?'; \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java index 96a2f806..75a0ca63 100644 --- a/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/achievements/AchievementManager.java @@ -251,7 +251,7 @@ public class AchievementManager { } try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) { - try (Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM achievements")) { + try (Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM achievements WHERE visible = 1")) { while (set.next()) { if (!this.achievements.containsKey(set.getString("name"))) { this.achievements.put(set.getString("name"), new Achievement(set));