SchemFlow

针对 Minecraft 服务器的闪电般快速的蓝图管理 (由 S3/MinIO 提供支持)。

资源图片
# 🌊 SchemFlow [![Release](https://img.shields.io/github/v/release/c4g7-dev/SchemFlow?style=for-the-badge&color=brightgreen)](https://github.com/c4g7-dev/SchemFlow/releases) [![GitHub Downloads](https://img.shields.io/github/downloads/c4g7-dev/SchemFlow/total?style=for-the-badge&color=blue&label=GitHub%20Downloads)](https://github.com/c4g7-dev/SchemFlow/releases) [![License](https://img.shields.io/github/license/c4g7-dev/SchemFlow?style=for-the-badge)](https://github.com/c4g7-dev/SchemFlow/blob/main/SchemFlow/LICENSE) [![Java](https://img.shields.io/badge/Java-21-orange?style=for-the-badge&logo=openjdk)](https://openjdk.org/) [![Paper](https://img.shields.io/badge/Server-Paper%2FPurpur-00ADD8?style=for-the-badge&logo=minecraft)](https://papermc.io/) Cloud‑native schematic manager for Paper/Purpur 1.21+. Purpose‑built for multi‑server networks and automated build pipelines: push once to S3/MinIO, every node can fetch/paste instantly. 100% backed by S3‑compatible object storage (AWS S3, MinIO, Cloudflare R2, Wasabi, etc.) — no shared disk, no rsync, no manual copying. Includes group isolation, safe trash + restore, undo/redo for deletes, and optional world provisioning with minimal runtime overhead. ## What is it? SchemFlow centralizes schematics in S3/MinIO and gives you fast in‑game commands to upload, distribute, and paste builds across any number of servers—without copying files manually. ## Why use SchemFlow? - One push → all servers see it - Safer deletes (trash + restore) - Group isolation + rename + delete lifecycle - Undo/redo integration for paste/delete - Low overhead (transient cache only) - Optional world provisioning for hubs/spawns ### Requirements - Minecraft: 1.21+ - Java: 21+ - Server: Paper or Purpur ### Dependencies Required (choose ONE): - WorldEdit 7.2.18+ OR - FastAsyncWorldEdit (FAWE) (matching your server version) Optional Extension: - Skript 2.7+ (adds simple automation scripting of SchemFlow commands; not required for core features) --- ### Object Storage Advantages Why S3 instead of the local `schematics/` folder? - Single authoritative store across multiple servers (build → staging → prod) with zero manual sync - Perfect for network hubs, build clusters, ephemeral containers, CI-driven content deployment - Horizontal scaling: any node with credentials can read/write immediately (no warmup copy step) - Works with any S3‑compatible backend: AWS S3, MinIO, Cloudflare R2, Wasabi, Backblaze B2 (S3 API), DigitalOcean Spaces, etc. - No FTP / rsync / NFS mount complexity; just object keys over HTTPS - Low CPU / memory overhead (short‑lived temp export + ephemeral paste cache only) - Trash namespace prevents accidental permanent deletion - Clean path layout: `SF_/name.schm` (data) + `.trash/` (soft deleted) - Leverage provider durability, lifecycle, replication & CDN (if fronted) for distribution --- ## Features - S3/MinIO storage (configurable `rootDir`, `defaultGroup`). - Group path pattern: `SF_/.schm` + flat trash: `.trash/.schm`. - Address schematics by simple `name` or `group:name`. - Core ops: upload, fetch, paste, delete (soft), restore, list, cache refresh. - Trash safety layer + irreversible clear with `--confirm`. - Group lifecycle: create / delete (preview + confirm) / rename. - WorldEdit integration flags: `-e` entities, `-a` ignore air, `-b` biomes (default on). - Undo/redo for SchemFlow deletes + fallback to WorldEdit history for pastes. - Independent selection commands (`pos1`, `pos2`). - World provisioning (`provision `). - Ephemeral paste cache (auto purged) keeps disk clean. ### Ephemeral Paste Cache Operational pastes use `plugins/SchemFlow/work/cache/`. Contents are transient and cleared on enable, reload, or disable. Only `/SchemFlow fetch` writes persistent files to the configured download directory. --- ## Installation 1. Download `SchemFlow--all.jar`. 2. Place into `plugins/`. 3. Install WorldEdit OR FAWE (not both). Skript optional. 4. Start the server once to generate `plugins/SchemFlow/config.yml`. 5. Configure S3/MinIO credentials + bucket. Restart. ### Minimal Config Snippet ```yaml endpoint: "play.minio.local:9000" # or https://s3.example.com secure: true accessKey: "ACCESS_KEY" secretKey: "SECRET_KEY" bucket: "schematics" extension: "schm" cacheRefreshSeconds: 60 storage: rootDir: "FlowStack/SchemFlow" defaultGroup: "default" ``` --- ## Quick Start - Select region: `/SchemFlow pos1`, move, `/SchemFlow pos2`. - Upload: `/SchemFlow upload lobby_spawn -e -group lobby`. - Paste: `/SchemFlow paste lobby:spawn -a` (ignore air) or `/SchemFlow paste spawn` (default group). - List all grouped schematics: `/SchemFlow list`. - Delete (soft): `/SchemFlow delete lobby:spawn` → restore later. - Restore: `/SchemFlow restore spawn -group lobby`. - Permanently clear trash: `/SchemFlow trash clear --confirm`. - Rename a group: `/SchemFlow group rename oldName newName`. - Provision a world: `/SchemFlow provision buildworld`. - Refresh cache: `/SchemFlow cache`. --- ## Commands ``` /SchemFlow help /SchemFlow list /SchemFlow fetch [group:]name [destDir] | /SchemFlow fetch /absolute/path(.schm) [destDir] /SchemFlow pos1 | /SchemFlow pos2 /SchemFlow upload [-e] [-a] [-b] [-group ] /SchemFlow paste [group:]name [-e] [-a] [-b] /SchemFlow delete [group:]name /SchemFlow restore [-group ] /SchemFlow trash # list trash /SchemFlow trash clear --confirm /SchemFlow undo | /SchemFlow redo /SchemFlow cache | /SchemFlow reload /SchemFlow groups /SchemFlow group create /SchemFlow group delete [--confirm] /SchemFlow group rename /SchemFlow provision ``` ### Flags - `-e` include entities (upload/paste) - `-a` ignore air blocks (paste) - `-b` include biomes (paste; enabled by default if omitted) - `-group ` target a non-default group --- ## Permissions | Node | Purpose | Default | |------|---------|---------| | `schemflow.admin` | All commands | op | | `schemflow.help` | View help | true | | `schemflow.list` | List schematics | true | | `schemflow.fetch` | Download schematic | true | | `schemflow.pos1` | Set pos1 | true | | `schemflow.pos2` | Set pos2 | true | | `schemflow.upload` | Upload schematic | op | | `schemflow.paste` | Paste schematic | op | | `schemflow.delete` | Soft delete schematic | op | | `schemflow.restore` | Restore from trash | op | | `schemflow.trash.clear` | Clear trash permanently | op | | `schemflow.cache` | Refresh cache | op | | `schemflow.reload` | Reload config | op | | `schemflow.provision` | Provision world | op | | `schemflow.groups` | List groups | op | | `schemflow.group.create` | Create group | op | | `schemflow.group.delete` | Delete group | op | | `schemflow.group.rename` | Rename group | op | --- ## Links - GitHub: https://github.com/c4g7-dev/SchemFlow - Releases: https://github.com/c4g7-dev/SchemFlow/releases - Wiki: https://github.com/c4g7-dev/SchemFlow/wiki - Issues: https://github.com/c4g7-dev/SchemFlow/issues - Discord: https://discord.gg/eNNbqS4N2H ## License Apache-2.0 — see LICENSE and NOTICE. --- ### Notes - WorldEdit or FAWE must be present (but not both). - Trash + restore protect against accidental loss; use `--confirm` for irreversible operations. - Biome copying is on unless `-b` is excluded and flags parsing disables it. - Ephemeral cache avoids clutter; prefer `/SchemFlow fetch` for persistent exports.