Skip to content

Commit 0dcda05

Browse files
committed
Add README for developers and add JitPack badge
1 parent c47820b commit 0dcda05

File tree

3 files changed

+119
-1
lines changed

3 files changed

+119
-1
lines changed

README.md

+59
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# BungeePteroPower
22
![LogoArt](https://github.com/Kamesuta/BungeePteroPower/assets/16362824/e8914f79-806b-436c-a0e6-e4eaf8ad5eca)
33
[![Spigotmc Available](https://img.shields.io/badge/Spigotmc-Download-green)](https://www.spigotmc.org/resources/%E2%9A%A1-bungeepteropower-%E2%9A%A1-start-stop-servers-when-player-join-leave.114883/)
4+
[![JitPack](https://jitpack.io/v/Kamesuta/BungeePteroPower.svg)](https://jitpack.io/#Kamesuta/BungeePteroPower)
45

56
BungeePteroPower is a plugin that can automatically start/stop servers based on the number of players.
67
It can start and stop servers on the [Pterodactyl panel](https://pterodactyl.io/) when players join or leave the Bungeecord proxy server.
@@ -150,3 +151,61 @@ BungeePteroPower plugin allows fine-grained control over commands available to p
150151
- Upon startup, a file for the language set in `config.yml` will be generated.
151152
- You can edit and then reload the plugin's language by using the `/ptero reload` command.
152153
- Contributions via Pull Requests for additional language files are welcome.
154+
155+
## Information for Plugin Developers
156+
157+
### Creating Add-ons
158+
159+
- BungeePteroPower provides an API for integration with other plugins.
160+
- If you want to support platforms other than Pterodactyl, it is possible by implementing the API.
161+
- You can use the BungeePteroPower API by adding dependencies.
162+
1. Add the JitPack repository inside the pom.xml of your add-on:
163+
```xml
164+
<repositories>
165+
<repository>
166+
<id>jitpack.io</id>
167+
<url>https://jitpack.io</url>
168+
</repository>
169+
</repositories>
170+
```
171+
2. Add BungeePteroPower as a dependency:
172+
```xml
173+
<dependency>
174+
<groupId>com.github.Kamesuta</groupId>
175+
<artifactId>BungeePteroPower</artifactId>
176+
<version>version</version>
177+
</dependency>
178+
```
179+
3. Add the dependency to your plugin.yml:
180+
```yml
181+
depends:
182+
- BungeePteroPower
183+
```
184+
4. Use the API:
185+
```java
186+
import com.kamesuta.bungeepteropower.api.BungeePteroPowerAPI;
187+
188+
public class YourPlugin extends JavaPlugin {
189+
@Override
190+
public void onEnable() {
191+
// Get an instance of BungeePteroPowerAPI
192+
BungeePteroPowerAPI api = BungeePteroPowerAPI.getInstance();
193+
// Register your custom PowerController
194+
api.registerPowerController("your_service", new YourPowerController());
195+
}
196+
}
197+
```
198+
- If you want your PowerController to be added to BungeePteroPower, please send a pull request.
199+
200+
### Building
201+
202+
Pull requests are welcome for BungeePteroPower.
203+
You can build it using the following steps:
204+
205+
```bash
206+
git clone https://github.com/Kamesuta/BungeePteroPower.git
207+
cd BungeePteroPower
208+
mvn install
209+
```
210+
- This plugin needs to be built with Java 11 or higher.
211+
- After building, a `BungeePteroPower-<version>.jar` file will be generated in the `target` directory.

README_ja.md

+59
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# BungeePteroPower
22
![LogoArt](https://github.com/Kamesuta/BungeePteroPower/assets/16362824/e8914f79-806b-436c-a0e6-e4eaf8ad5eca)
33
[![Spigotmc Available](https://img.shields.io/badge/Spigotmc-ダウンロード-green)](https://www.spigotmc.org/resources/%E2%9A%A1-bungeepteropower-%E2%9A%A1-start-stop-servers-when-player-join-leave.114883/)
4+
[![JitPack](https://jitpack.io/v/Kamesuta/BungeePteroPower.svg)](https://jitpack.io/#Kamesuta/BungeePteroPower)
45

56
BungeePteroPowerは、サーバーの人数に応じてサーバーを自動的に起動/終了することができるプラグインです。
67
プレイヤーがBungeecordプロキシサーバーに参加または退出したときに、[Pterodactylパネル](https://pterodactyl.io/)上のサーバーを起動および停止することができます。
@@ -150,3 +151,61 @@ BungeePteroPowerプラグインでは、パーミッションを使用して、
150151
- 起動すると、`config.yml`の `language` で設定した言語のファイルが生成されます。
151152
- 編集してから `/ptero reload` コマンドで再読み込みすることで、プラグインの言語を変更できます。
152153
- Pull Requestで言語ファイルを追加していただけると嬉しいです。
154+
155+
## プラグインの開発者向け情報
156+
157+
### アドオンを作成する
158+
159+
- BungeePteroPowerは、他のプラグインと連携するためのAPIを提供しています。
160+
- Pterodactyl以外に対応したい場合は、APIを実装することで対応可能です。
161+
- 依存関係を追加することで、BungeePteroPowerのAPIを使用できます。
162+
1. アドオン内のpom.xml内にJitPackリポジトリを追加します
163+
```xml
164+
<repositories>
165+
<repository>
166+
<id>jitpack.io</id>
167+
<url>https://jitpack.io</url>
168+
</repository>
169+
</repositories>
170+
```
171+
2. BungeePteroPowerを依存関係に追加します
172+
```xml
173+
<dependency>
174+
<groupId>com.github.Kamesuta</groupId>
175+
<artifactId>BungeePteroPower</artifactId>
176+
<version>バージョン</version>
177+
</dependency>
178+
```
179+
3. bungee.ymlに依存関係を追加します
180+
```yml
181+
depends:
182+
- BungeePteroPower
183+
```
184+
4. APIを使用します
185+
```java
186+
import com.kamesuta.bungeepteropower.api.BungeePteroPowerAPI;
187+
188+
public class YourPlugin extends JavaPlugin {
189+
@Override
190+
public void onEnable() {
191+
// BungeePteroPowerAPIのインスタンスを取得します
192+
BungeePteroPowerAPI api = BungeePteroPowerAPI.getInstance();
193+
// カスタムPowerControllerを登録します
194+
api.registerPowerController("your_service", new YourPowerController());
195+
}
196+
}
197+
```
198+
- あなたのPowerControllerをBungeePteroPowerに追加してほしい場合は、プルリクエストを送ってください。
199+
200+
### ビルド
201+
202+
BungeePteroPowerではプルリクエストを歓迎しています。
203+
以下の手順でビルドできます。
204+
205+
```bash
206+
git clone https://github.com/Kamesuta/BungeePteroPower.git
207+
cd BungeePteroPower
208+
mvn install
209+
```
210+
- このプラグインは、Java 11 以上でビルドする必要があります。
211+
- ビルド後、`target` ディレクトリに `BungeePteroPower-<バージョン>.jar` ファイルが生成されます。

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.kamesuta</groupId>
88
<artifactId>BungeePteroPower</artifactId>
9-
<version>1.1-SNAPSHOT</version>
9+
<version>1.2-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>BungeePteroPower</name>

0 commit comments

Comments
 (0)