Fix upgrader checking wrong conifg file version

Signed-off-by: BuildTools <[email protected]>
This commit is contained in:
BuildTools committed 2021-07-08 02:22:16 +03:00
1 parent 5c16573f39
commit f589ffe6ea
1 file changed
+1 -1
@@ -14,7 +14,7 @@ public class UpgradeDatabase {
// Upgrade the database system if the config file version is not high enough
public static void upgradeDatabase() {
plugin.reloadConfig();
if (plugin.getConfig().getInt("config_file_version", 1) > 5) {
if (plugin.getConfig().getInt("config_file_version", 1) <= 5) {
plugin.getLogger().info("Detected that the database needs updating. Running database upgrade...");
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
try (PreparedStatement statement = HuskHomes.getConnection().prepareStatement("ALTER TABLE " + HuskHomes.getSettings().getPlayerDataTable() + " ADD `is_ignoring_requests` boolean NOT NULL DEFAULT 0")) {