Skip to content

Commit b904b30

Browse files
committed
chore: add readme
1 parent 2708253 commit b904b30

File tree

2 files changed

+140
-0
lines changed

2 files changed

+140
-0
lines changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
2+
# README
3+
4+
README language: 日本語 (baseline) | [English](README_en.md)
5+
6+
---
7+
---
8+
9+
## 日本語
10+
11+
概要
12+
13+
GraceStopAnnouncer は、Java 製の Minecraft サーバープラグインで、Graceful shutdown(優雅な停止)時に接続保持や通知を行うための機能を提供します。Bukkit/Spigot と Velocity の両方をサポートしています。
14+
15+
主な用途:
16+
17+
- サーバー停止時に接続を保持してクライアントの切断を遅延させる
18+
- 外部サービス(例: ロードバランサやオーケストレーションツール)からの停止通知を受け取り、プラグイン側で適切に処理する
19+
20+
このリポジトリは以下の主要パッケージを含みます:
21+
22+
- `src/main/java/net/azisaba/gracestopannouncer/bukkit/` — Bukkit 用アダプタとプラグイン本体
23+
- `src/main/java/net/azisaba/gracestopannouncer/velocity/` — Velocity 用アダプタとプラグイン本体
24+
- `src/main/java/net/azisaba/gracestopannouncer/core/` — 共通コアロジック
25+
- `src/main/resources/` — デフォルト設定ファイル(`config.yml`, `velocity-config.yml` など)
26+
27+
## 特徴
28+
29+
- Bukkit(Spigot/Paper)と Velocity の両対応
30+
- 停止通知の受信ハンドラ(`PreStopHookReceiver` 等)
31+
- 接続をホールドするハンドラ(`HoldConnectionHandler`
32+
- カスタムメッセージフォーマッタ(`MessageFormatter`
33+
34+
## 要件
35+
36+
- Java 8 以上
37+
- Maven(`pom.xml` がリポジトリに含まれています)
38+
39+
## ビルド方法
40+
41+
プロジェクトのルートで以下のコマンドを実行してビルドします(macOS/zsh の場合):
42+
43+
```bash
44+
mvn clean package
45+
```
46+
47+
ビルドに成功すると、`target/GraceStopAnnouncer.jar``target/original-GraceStopAnnouncer.jar` が生成されます。
48+
49+
## 設定
50+
51+
デフォルト設定ファイルは `src/main/resources/` にあります:
52+
53+
- `config.yml` — Bukkit 用の設定
54+
- `velocity-config.yml` — Velocity 用の設定
55+
56+
必要に応じてこれらをサーバーのプラグイン設定フォルダにコピーして編集してください。
57+
58+
## 使い方(デプロイ)
59+
60+
1. 対応するサーバープラットフォーム(Bukkit/Velocity)へ JAR を配置します。
61+
2. サーバーを再起動またはリロードしてプラグインを読み込ませます。
62+
3. 設定ファイルを編集して通知メッセージやホールド挙動を調整します。
63+
64+
## 開発者向けノート
65+
66+
- コアのエントリポイントや各アダプタの実装は `src/main/java/net/azisaba/gracestopannouncer/` 以下を確認してください。
67+
- 単体テストはこのリポジトリに含まれていないようです。必要なら JUnit 等で追加してください。
68+
69+
## ライセンス
70+
71+
プロジェクトにライセンスファイルが含まれていない場合は、利用/配布ポリシーをリポジトリ管理者に確認してください。

README_en.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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

Comments
 (0)