86 lines
3.2 KiB
Markdown
86 lines
3.2 KiB
Markdown
# Launcher Catalog
|
|
|
|
프로필은 관리자 측에서 미리 등록합니다.
|
|
|
|
- 기본 로컬 파일: `app/assets/launcher/catalog.json`
|
|
- 또는 운영용 원격 JSON
|
|
|
|
클라이언트는 설치 페이지에서 이 카탈로그를 읽기 전용으로 확인하고, 원하는 항목만 자기 라이브러리에 추가합니다.
|
|
|
|
## 형식
|
|
|
|
```json
|
|
{
|
|
"version": 1,
|
|
"profiles": [
|
|
{
|
|
"id": "my-map-profile",
|
|
"name": "My Map Profile",
|
|
"description": "설명",
|
|
"details": "설치 페이지 상세 패널에 표시할 긴 설명",
|
|
"modsEnabled": true,
|
|
"pluginsEnabled": false,
|
|
"serverEnabled": false,
|
|
"distributionUrl": "admin/data/distributions/my-map-profile.distribution.json",
|
|
"worldArchiveUrl": "https://example.com/worlds/my-map.zip",
|
|
"worldDirectoryName": "My Map"
|
|
},
|
|
{
|
|
"id": "my-plugin-server-profile",
|
|
"name": "My Plugin Server Profile",
|
|
"description": "플러그인 서버 포함 프로필",
|
|
"details": "주소가 없으면 로컬 서버를 실행하고, 주소가 있으면 해당 서버로 접속합니다.",
|
|
"modsEnabled": false,
|
|
"pluginsEnabled": true,
|
|
"serverEnabled": true,
|
|
"distributionUrl": "admin/data/distributions/my-plugin-server-profile.distribution.json",
|
|
"worldArchiveUrl": "https://example.com/worlds/plugin-map.zip",
|
|
"worldDirectoryName": "Plugin Map",
|
|
"serverJarUrl": "https://example.com/server/paper.jar",
|
|
"serverPort": 25565,
|
|
"serverMemoryMb": 4096,
|
|
"serverMaxPlayers": 20,
|
|
"serverWhitelistEnabled": false
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## 필드
|
|
|
|
- `id`: 내부 식별자
|
|
- `name`: 라이브러리/설치 페이지 표시 이름
|
|
- `description`: 표시 설명
|
|
- `details`: 설치 페이지 상세 패널에 표시할 긴 설명
|
|
- `modsEnabled`: 모드 기능 사용 여부
|
|
- `pluginsEnabled`: 플러그인 기능 사용 여부. 켜면 서버도 같이 사용
|
|
- `serverEnabled`: 서버 기능 사용 여부
|
|
- `distributionUrl`: Helios distribution.json URL 또는 로컬 경로
|
|
- `worldArchiveUrl`: 월드 ZIP 또는 로컬 경로
|
|
- `worldDirectoryName`: 게임 `saves/` 아래와 로컬 서버 `world/`에 사용할 월드 폴더 이름
|
|
- `serverJarUrl`: 로컬 서버 실행에 사용할 버킷 JAR 경로 또는 URL
|
|
- `serverPort`: 로컬 서버 포트
|
|
- `serverMemoryMb`: 로컬 서버 최대 메모리(MB)
|
|
- `serverMaxPlayers`: 로컬 서버 최대 인원수
|
|
- `serverWhitelistEnabled`: 로컬 서버 화이트리스트 사용 여부
|
|
|
|
## 런처가 계산하는 상태
|
|
|
|
아래 값들은 런처가 내부적으로 계산하는 상태라 파일에 직접 넣지 않아도 됩니다.
|
|
|
|
- `launchReady`: 실행에 필요한 필드가 모두 있는지 여부
|
|
- `hostReady`: 서버 기능 프로필이 로컬 호스팅 가능한지 여부
|
|
|
|
판정 기준:
|
|
|
|
- 공통 실행: `distributionUrl`, `worldArchiveUrl`, `worldDirectoryName`
|
|
- 로컬 서버 실행 추가 조건: `serverEnabled=true` 이고 `serverJarUrl` 존재
|
|
|
|
## 현재 구현 범위
|
|
|
|
- 맵 기반 싱글플레이 실행
|
|
- 맵 + 모드 클라이언트 실행
|
|
- 서버 기능 프로필의 직접 주소 입력 접속
|
|
- 서버 기능 프로필의 로컬 버킷 JAR 실행
|
|
- 자동 포트 개방 상태 표시
|