|
| 1 | +# README |
| 2 | + |
| 3 | +README language: English | 日本語 (README.md) |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## English |
| 8 | + |
| 9 | +Overview |
| 10 | + |
| 11 | +GraceStopAnnouncer is a Java-based Minecraft server plugin that provides graceful shutdown features such as holding player connections and emitting notifications during server stop. It supports both Bukkit/Spigot and Velocity platforms. |
| 12 | + |
| 13 | +Primary uses: |
| 14 | + |
| 15 | +- Hold player connections temporarily during server shutdown to delay client disconnects |
| 16 | +- Receive stop notifications from external systems (e.g., load balancers or orchestration) and handle them gracefully in-plugin |
| 17 | + |
| 18 | +Key packages in this repository: |
| 19 | + |
| 20 | +- `src/main/java/net/azisaba/gracestopannouncer/bukkit/` — Bukkit adapter and plugin entry |
| 21 | +- `src/main/java/net/azisaba/gracestopannouncer/velocity/` — Velocity adapter and plugin entry |
| 22 | +- `src/main/java/net/azisaba/gracestopannouncer/core/` — Core logic shared by adapters |
| 23 | +- `src/main/resources/` — Default configuration files (e.g., `config.yml`, `velocity-config.yml`) |
| 24 | + |
| 25 | +## Features |
| 26 | + |
| 27 | +- Supports both Bukkit (Spigot/Paper) and Velocity |
| 28 | +- Pre-stop hook receiver (`PreStopHookReceiver`) |
| 29 | +- Connection hold handler (`HoldConnectionHandler`) |
| 30 | +- Message formatting utilities (`MessageFormatter`) |
| 31 | + |
| 32 | +## Requirements |
| 33 | + |
| 34 | +- Java 8 or newer |
| 35 | +- Maven (project uses `pom.xml`) |
| 36 | + |
| 37 | +## Build |
| 38 | + |
| 39 | +From the project root run: |
| 40 | + |
| 41 | +```bash |
| 42 | +mvn clean package |
| 43 | +``` |
| 44 | + |
| 45 | +Successful build artifacts are placed in `target/` (e.g., `target/GraceStopAnnouncer.jar`). |
| 46 | + |
| 47 | +## Configuration |
| 48 | + |
| 49 | +Default configuration files live under `src/main/resources/`: |
| 50 | + |
| 51 | +- `config.yml` — for Bukkit |
| 52 | +- `velocity-config.yml` — for Velocity |
| 53 | + |
| 54 | +Copy and edit the appropriate file into your server's plugin config folder before starting the server. |
| 55 | + |
| 56 | +## Usage (deployment) |
| 57 | + |
| 58 | +1. Place the built JAR into the plugins/mods folder of the target server (Bukkit or Velocity). |
| 59 | +2. Restart or reload the server so the plugin loads. |
| 60 | +3. Modify configuration files to tune messages and hold behavior. |
| 61 | + |
| 62 | +## For contributors / developers |
| 63 | + |
| 64 | +- Inspect adapter implementations and core logic under `src/main/java/net/azisaba/gracestopannouncer/`. |
| 65 | +- There are no tests included by default; consider adding JUnit tests for key behaviors. |
| 66 | + |
| 67 | +## License |
| 68 | + |
| 69 | +If no LICENSE file is present, check with the repository owner for usage and distribution rights. |
0 commit comments