diff --git a/src/engine/db/handlers/dbMineHandler.java b/src/engine/db/handlers/dbMineHandler.java index ec8c0f6e..f00e900d 100644 --- a/src/engine/db/handlers/dbMineHandler.java +++ b/src/engine/db/handlers/dbMineHandler.java @@ -15,6 +15,7 @@ import engine.objects.MineProduction; import engine.objects.Resource; import org.pmw.tinylog.Logger; +import java.net.UnknownHostException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -69,9 +70,11 @@ public class dbMineHandler extends dbHandlerBase { PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM obj_mine;")) { ResultSet rs = preparedStatement.executeQuery(); - mines = getObjectsFromRs(rs, 1000); + while(rs.next()){ + mines.add(new Mine(rs)); + } - } catch (SQLException e) { + } catch (SQLException | UnknownHostException e) { Logger.error(e); } return mines;