Files
purpur-trigger-spawn/README.md
T
dmg bce513e922
CI / build (push) Successful in 59s
CI / build (pull_request) Successful in 1m2s
feat(spawn): support Purpur 26.3
2026-10-17 00:11:07 -04:00

74 lines
3.5 KiB
Markdown

# Purpur Trigger Spawn
A Purpur 26.3 plugin providing progression-gated, safe teleportation to each world's spawn area.
Players unlock `/spawn` by killing a Warden, Ender Dragon, or Wither after the plugin is installed. Their first, second, and third unique kills give default cooldowns of 8 hours, 4 hours, and 1 hour respectively. Each new unique kill clears the current cooldown immediately; repeated kills of the same boss do not count.
`/spawn` uses real elapsed cooldown time, including time offline. An accepted request displays a three-second countdown. Walking to another block, jumping, falling, teleporting, changing worlds, or disconnecting cancels it; looking around does not. The plugin samples a safe destination in the current world's circular spawn area, and failures do not consume the cooldown.
The behavior under development is specified in the [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/purpur-trigger-spawn/index.md).
## Requirements
- Purpur 26.3 build 2651
- Java 25
The automated native lifecycle boundary downloads that exact runtime and accepts it only with
SHA-256 `0677c1febecfbc2e5b0a7f76abd647b70a1f38d3cbdf3dd6a82e401b4262a598`.
Repository, checkout and new artifacts use `purpur-trigger-spawn`. Runtime `TriggerSpawn`, Java entrypoint/packages, `plugins/TriggerSpawn/`, commands/permissions, boss progression, cooldowns and world spawn settings remain unchanged. Replace the old JAR rather than installing both distributions. Old tags/assets remain available; new releases no longer support Java 17.
## Build
```bash
./gradlew clean check jar
```
The plugin JAR is written to `build/libs/purpur-trigger-spawn-<version>.jar`.
`check` includes `nativeLifecycleTest`: it checksum-verifies Purpur 26.3 build 2651, prepares the
runtime in Paperclip patch-only mode, and loads, enables, and disables the packaged plugin through
Purpur's native JavaPlugin lifecycle. The isolated test verifies command/listener wiring, retained
configuration and YAML state without starting a listening server, accepting the EULA, or creating a
world. Scheduler, teleport, safe-location, world-border, persistence, metadata, bytecode, and JAR
exclusion regressions run alongside that boundary; this is automated compatibility evidence, not a
live-server or deployment claim.
On first startup, the plugin creates `plugins/TriggerSpawn/config.yml`. Its cooldown defaults are:
```yaml
cooldowns:
one-kill-seconds: 28800
two-kill-seconds: 14400
three-kill-seconds: 3600
```
Durable player and per-world state is stored in `plugins/TriggerSpawn/state.yml`.
Each world initially uses its native spawn and a 20-block circular radius. An operator can configure the current world with:
```text
/spawnadmin set
/spawnadmin distance <blocks>
/spawnadmin info
/spawnadmin grant <player> <duration>
/spawnadmin remove <player>
/spawnadmin access [page]
/spawnadmin ban <player>
/spawnadmin unban <player>
/spawnadmin bans [page]
```
Grant durations support friendly units and combinations such as `30m`, `2h`, `1d`, or `1h30m`.
For a local versioned build:
```bash
./gradlew clean check jar -PreleaseVersion=1.2.3
```
## Releases
Gitea Actions checks every push and pull request and stores a development JAR as a workflow artifact. Pull requests also validate conventional commits.
Pushes to `main` run semantic-release. A release-causing conventional commit builds a versioned JAR and attaches it to the corresponding public Gitea release. The repository must define a `RELEASE_TOKEN` secret with repository contents write permission.