public void registerHabitat(Cuboid c, HabitatType type, String owner, String tenant, double worth, boolean buyable, double rental, boolean rentable, Map<Upgrade, Integer> upgrades) {
		if (existsHabitat(c.getID()) || existsHabitat(c.getName()) || getHabitatByOwner(owner) != null || getHabitatByTenant(tenant) != null) return;
		
		try {
			
			Habitat h = new Habitat(c, type, owner, tenant, worth, buyable, rental, rentable, upgrades);
			byte[] habitatByteArray = h.toByteArray();
			Blob blob = new SerialBlob(habitatByteArray);
			
			PreparedStatement registerHabitat = db.prepareStatement("INSERT INTO " + CuboidHandler.habitatTable + " (cuboidid, habitat) VALUES (?, ?);");
			registerHabitat.setInt(1, c.getID());
			registerHabitat.setBlob(2, blob);
			registerHabitat.executeUpdate();
			
			synchronizeHabitat(h.getCuboidID());
			
		} catch(Exception e) {
			e.printStackTrace();
		}
	}