Add automatic Geyser Bedrock pack support
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# RemotePackSync
|
||||
|
||||
RemotePackSync is a lightweight **Spigot 26.2** plugin that keeps a server resource pack synchronized with a remotely hosted SHA-1 checksum. It uses only the public Bukkit/Spigot API, so it runs unchanged on **Spigot, Paper, Purpur, and Bukkit-compatible servers**.
|
||||
RemotePackSync is a lightweight **Spigot 26.2** plugin that keeps Java Edition resource packs synchronized with a remotely hosted SHA-1 checksum and optionally serves a local Bedrock Edition pack to players connecting through **GeyserMC**. It uses only public Bukkit/Spigot and Geyser APIs, so it runs on **Spigot, Paper, Purpur, Bukkit-compatible servers, and current GeyserMC**.
|
||||
|
||||
No NMS, packet libraries, or fork-specific APIs are used.
|
||||
No NMS, packet libraries, or server-fork-specific APIs are used.
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -37,8 +37,12 @@ resourcePackUrl: "https://cdn.example.com/server-pack.zip"
|
||||
# URL to a text file containing the pack's SHA-1 checksum.
|
||||
sha1Url: "https://cdn.example.com/server-pack.zip.sha1"
|
||||
|
||||
# Seconds between SHA-1 checks. Minimum: 30.
|
||||
# Seconds between Java SHA-1 and Bedrock pack checks. Minimum: 30.
|
||||
refreshInterval: 300
|
||||
|
||||
# Optional local Bedrock Edition pack for GeyserMC players. Accepts .mcpack or .zip.
|
||||
# Relative paths are resolved from plugins/RemotePackSync/.
|
||||
bedrockResourcePack: "bedrock/server-pack.mcpack"
|
||||
```
|
||||
|
||||
The SHA-1 response must contain a 40-character hexadecimal SHA-1. Both of these standard formats work:
|
||||
@@ -53,12 +57,25 @@ The SHA-1 response must contain a 40-character hexadecimal SHA-1. Both of these
|
||||
|
||||
## Behaviour
|
||||
|
||||
### Java Edition
|
||||
|
||||
- On startup and at every refresh interval, RemotePackSync fetches only the SHA-1 file asynchronously.
|
||||
- When the SHA-1 changes, it sends the configured resource-pack URL and new hash to every online player.
|
||||
- Players joining after a successful SHA-1 fetch receive the current resource pack.
|
||||
- A failed request leaves the last known-good SHA-1 active, so a brief CDN outage does not interrupt existing pack delivery.
|
||||
- If both URLs are blank, delivery is disabled without error. If only one is set, the configuration is rejected and delivery remains disabled.
|
||||
|
||||
### Bedrock Edition through GeyserMC
|
||||
|
||||
- Set `bedrockResourcePack` to a local `.mcpack` or `.zip` file. `.mcpack` is fully supported.
|
||||
- The source pack is checked asynchronously at `refreshInterval`. When its SHA-256 changes, RemotePackSync creates a managed copy under `plugins/RemotePackSync/bedrock-managed/`.
|
||||
- The managed copy receives a deterministic new header UUID derived from the updated source SHA-256. This makes Bedrock clients treat a changed pack as a new pack, while Geyser calculates and supplies the required final pack hash and size.
|
||||
- The original configured pack is never modified.
|
||||
- Every new Geyser Bedrock connection receives the latest successfully processed pack through Geyser's public `SessionLoadResourcePacksEvent` API.
|
||||
- The pack must be a valid Bedrock pack containing `manifest.json` at the archive root. Geyser does **not** convert Java packs into Bedrock packs.
|
||||
- Bedrock's protocol only negotiates packs while a client connects. Players already connected when the file changes must reconnect to receive the new version; RemotePackSync cannot hot-push a replacement to an active Bedrock session.
|
||||
- If Geyser is absent, Java Edition resource-pack operation continues normally and Bedrock delivery stays disabled.
|
||||
|
||||
## Commands and permissions
|
||||
|
||||
- `/remotepacksync reload` (alias: `/rps reload`) reloads `config.yml` and begins a fresh asynchronous SHA-1 refresh.
|
||||
@@ -66,7 +83,7 @@ The SHA-1 response must contain a 40-character hexadecimal SHA-1. Both of these
|
||||
|
||||
## Compatibility
|
||||
|
||||
RemotePackSync compiles against `org.spigotmc:spigot-api:26.2-R0.1-SNAPSHOT` and targets Java 25, which is required by Minecraft/Spigot 26.2. Resource packs are sent through Bukkit's stable `Player#setResourcePack(String, byte[])` API.
|
||||
RemotePackSync compiles against `org.spigotmc:spigot-api:26.2-R0.1-SNAPSHOT` and Geyser API `2.11.0-SNAPSHOT`, targeting Java 25 as required by Minecraft/Spigot 26.2. Java packs are sent through Bukkit's stable `Player#setResourcePack(String, byte[])` API; Bedrock packs use Geyser's public pack/session API. Geyser is a soft dependency, so Java-only servers remain supported.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user