public RoomManager(Server Env) throws Exception
    {
        Environment = Env;

        DatabaseClient DB = new DatabaseClient(Environment.DataBase);
        ResultSet table = DB.Query("SELECT * FROM room_models;");

        while (table.next())
        {
            RoomModel Model = new RoomModel();
            Model.Name = table.getString("id");
            Model.DoorX = table.getInt("door_x");
            Model.DoorY = table.getInt("door_y");
            Model.DoorZ = table.getInt("door_z");
            Model.DoorOrientation = table.getInt("door_dir");
            Model.Heightmap = table.getString("heightmap");
            Model.ClubOnly = (table.getInt("club_only")==1);
            Model.VipOnly = (table.getInt("vip_only")==1);

            String[] tmpHeightmap = Model.Heightmap.split(""+(char)13);
            Model.MapSizeX = tmpHeightmap[0].length();
            Model.MapSizeY = tmpHeightmap.length;
            Model.SqState = new SquareState[Model.MapSizeX][Model.MapSizeY];
            Model.SqFloorHeight = new double[Model.MapSizeX][Model.MapSizeY];
            Model.SqSeatRot = new int[Model.MapSizeX][Model.MapSizeY];

            for (int y = 0; y < Model.MapSizeY; y++)
            {
                if (y > 0)
                {
                    tmpHeightmap[y] = tmpHeightmap[y].substring(1);
                }

                for (int x = 0; x < Model.MapSizeX; x++)
                {
                    String Square = tmpHeightmap[y].substring(x, x+1).trim().toLowerCase();

                    if (Square.equals("x"))
                    {
                        Model.SqState[x][y] = SquareState.BLOCKED;
                    }
                    else
                    {
                        try
                        {
                            Model.SqFloorHeight[x][y] = Double.parseDouble(Square);
                            Model.SqState[x][y] = SquareState.OPEN;
                            Model.Area++;
                        }
                        catch(Exception ex)
                        {
                            Model.SqState[x][y] = SquareState.BLOCKED;
                        }
                    }
                }
            }

            Model.SqFloorHeight[Model.DoorX][Model.DoorY] = Model.DoorZ;
            Models.put(Model.Name, Model);
        }
        table.close();
        DB.Close();
    }