refactor: remove legacy .lpschem format (TODO 117)

- Delete schematic/legacy/lpschem/ (LPSchematicLegacy + 5 pojo Gson models)
- Delete schematic/convert/LpschemConverter and /lp schematic convert command
- Remove SchematicClipboardBuilder.fromLegacy, convert branches in dispatcher/
  tab-completer/help, locales (ru/en), SCHEMATICS.md and yml comments
- Kept only .schem (WorldEdit) + .nbt
- Build green: checkstyle 0 errors, PMD 33
This commit is contained in:
loki5512344 2026-08-05 18:58:18 +02:00
parent de47bce56e
commit 9f70e2e586
Signed by: boba
GPG key ID: 253067914055423B
20 changed files with 5 additions and 361 deletions

View file

@ -8,7 +8,6 @@ Jump structures are loaded from `plugins/LoParkour/schematics/` and matched to a
|-----------|--------|--------|
| `.nbt` | Vanilla structure block, `/structure save` | Pasted with Bukkit `StructureManager` |
| `.schem`, `.schematic` | WorldEdit (`//copy`, `//schem save`) | Read via embedded WorldEdit clipboard IO |
| `.lpschem` | **Legacy LoParkour format** | Not used in-game; convert with `/lp schematic convert` |
During parkour generation, when the profile rolls **schematic** type, the plugin picks a random file whose `difficulty` in YAML is **≤** the player's schematic setting (0.0–1.0).
@ -37,16 +36,6 @@ Difficulty examples: `0.25`, `0.5`, `0.75`, `1.0` (must be between 0 and 1).
4. `/lp schematic reload` — reload files without restart
## Converting old `.lpschem` files
Place `.lpschem` files in `plugins/LoParkour/schematics/` or legacy `schematics-new/`, then:
```
/lp schematic convert
```
Each file becomes `parkour-<id>.schem` in `schematics/` and gets a `difficulty:` entry (from the old metadata, or `0.5` if missing). Original `.lpschem` files are kept; delete them manually after checking.
## Admin commands
| Command | Description |
@ -55,7 +44,6 @@ Each file becomes `parkour-<id>.schem` in `schematics/` and gets a `difficulty:`
| `/lp schematic pos1` / `pos2` | Set corners at your feet |
| `/lp create <difficulty>` | Save selection → `.schem` + YAML |
| `/lp schematic create <name> <difficulty>` | Save with custom name |
| `/lp schematic convert` | Convert all `.lpschem` in schematics folders |
| `/lp schematic list` | List loaded structures |
| `/lp schematic paste <name>` | Test-paste at your location |
| `/lp schematic reload` | Reload disk files |
@ -76,4 +64,3 @@ flowchart LR
- `plugins/LoParkour/schematics/` — `.nbt`, `.schem`, `.schematic` (active)
- `plugins/LoParkour/schematics/schematics.yml` — difficulty map
- `plugins/LoParkour/schematics-new/` — legacy; scanned only for `.lpschem` convert

View file

@ -63,7 +63,7 @@ generation:
advanced:
# -= Spawn platform =-
# Start area is a flat square platform at the session cell (no .lpschem island).
# Start area is a flat square platform at the session cell (no structure island).
island:
# Legacy key (unused for spawn). Course schematics use schematics.yml / schematics-new.

View file

@ -354,7 +354,6 @@ schematic:
line_pos2: "&#FF4444/LoParkour schematic pos2 &#404040- &#A0A0A0Set position 2"
line_create: "&#FF4444/LoParkour create <difficulty> &#404040- &#A0A0A0Save selection to .schem + yml"
line_create_named: "&#FF4444/LoParkour schematic create <name> <difficulty> &#404040- &#A0A0A0Named save"
line_convert: "&#FF4444/LoParkour schematic convert &#404040- &#A0A0A0Convert .lpschem to .schem"
line_paste: "&#FF4444/LoParkour schematic paste <name> &#404040- &#A0A0A0Test-paste"
line_list: "&#FF4444/LoParkour schematic list &#404040- &#A0A0A0List loaded"
line_reload: "&#FF4444/LoParkour schematic reload &#404040- &#A0A0A0Reload from disk"
@ -370,8 +369,6 @@ schematic:
selection_incomplete: "&#FF4444Selection incomplete. Use wand or pos1/pos2 first."
created: "&#A0A0A0Added &#FF4444%s &#404040(diff %s) as &#FF4444%s"
create_failed: "&#FF4444Create failed: %s"
convert_done: "&#A0A0A0Converted %s file(s), %s failed."
convert_truncated: "&#A0A0A0...and %s more (see console)."
not_found: "&#FF4444Schematic '%s' not found."
pasted: "&#A0A0A0Pasted &#FF4444%s&#A0A0A0."

View file

@ -353,7 +353,6 @@ schematic:
line_pos2: "&#FF4444/LoParkour schematic pos2 &#404040- &#A0A0A0Позиция 2"
line_create: "&#FF4444/LoParkour create <сложность> &#404040- &#A0A0A0Сохранить в .schem + yml"
line_create_named: "&#FF4444/LoParkour schematic create <имя> <сложность> &#404040- &#A0A0A0С именем"
line_convert: "&#FF4444/LoParkour schematic convert &#404040- &#A0A0A0.lpschem → .schem"
line_paste: "&#FF4444/LoParkour schematic paste <имя> &#404040- &#A0A0A0Тестовая вставка"
line_list: "&#FF4444/LoParkour schematic list &#404040- &#A0A0A0Список"
line_reload: "&#FF4444/LoParkour schematic reload &#404040- &#A0A0A0Перезагрузка"
@ -369,8 +368,6 @@ schematic:
selection_incomplete: "&#FF4444Сначала выделите область (палочка или pos1/pos2)."
created: "&#A0A0A0Добавлено &#FF4444%s &#404040(сложн. %s) → &#FF4444%s"
create_failed: "&#FF4444Ошибка: %s"
convert_done: "&#A0A0A0Конвертировано: %s, ошибок: %s."
convert_truncated: "&#A0A0A0...ещё %s (см. консоль)."
not_found: "&#FF4444Схема '%s' не найдена."
pasted: "&#A0A0A0Вставлено: &#FF4444%s&#A0A0A0."

View file

@ -2,7 +2,6 @@
# plugins/LoParkour/schematics/
# .nbt — structure block export
# .schem / .schematic — WorldEdit or /lp create
# .lpschem — legacy; run /lp schematic convert
# In-game: /lp schematic wand → select → /lp create <difficulty>
# Docs: plugins/LoParkour/docs/SCHEMATICS.md