|
1 | 1 | # BungeePteroPower
|
2 | 2 | 
|
3 | 3 | [](https://www.spigotmc.org/resources/%E2%9A%A1-bungeepteropower-%E2%9A%A1-start-stop-servers-when-player-join-leave.114883/)
|
| 4 | +[](https://jitpack.io/#Kamesuta/BungeePteroPower) |
4 | 5 |
|
5 | 6 | BungeePteroPower is a plugin that can automatically start/stop servers based on the number of players.
|
6 | 7 | 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
|
150 | 151 | - Upon startup, a file for the language set in `config.yml` will be generated.
|
151 | 152 | - You can edit and then reload the plugin's language by using the `/ptero reload` command.
|
152 | 153 | - 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. |
0 commit comments