diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/storage/ModernMySQLStorageProvider.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/storage/ModernMySQLStorageProvider.java index df1f3a18..622b3ed4 100644 --- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/storage/ModernMySQLStorageProvider.java +++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/storage/ModernMySQLStorageProvider.java @@ -534,7 +534,7 @@ public int getInitialSchemaVersion() throws SQLException { try (final Statement stmt = this.conn.createStatement(); final ResultSet rs = stmt.executeQuery(this.prefixer.apply(GET_STARTED_DATE_COLUMN))) { - if (rs.first()) { + if (rs.next()) { return LATEST_SCHEMA_VERSION; } else { return 1; @@ -548,7 +548,7 @@ public int getCurrentSchemaVersion() throws SQLException { try (final Statement stmt = this.conn.createStatement(); final ResultSet rs = stmt.executeQuery(this.prefixer.apply(SELECT_SCHEMA_VERSION))) { - if (rs.first()) { + if (rs.next()) { final int version = Integer.parseUnsignedInt(rs.getString(1)); this.plugin.getQuestsLogger().debug("Current schema version: " + version + "."); return version;