mine load error

This commit is contained in:
2024-12-31 20:14:48 -06:00
parent 14cac0d892
commit ff082487b5
+4
View File
@@ -72,6 +72,10 @@ public class Mine extends AbstractGameObject {
public Mine(ResultSet rs) throws SQLException, UnknownHostException {
super(rs);
if (rs.getInt("capSize") == 0) {
throw new IllegalArgumentException("Mine creation canceled: capSize cannot be 0");
}
this.mineType = MineProduction.getByName(rs.getString("mine_type"));
int ownerUID = rs.getInt("mine_ownerUID");