ABOUT
DevBukkitAutoreloader is a development tool for plugin developers that will automatically reload your testing server after a plugin build.
Have you ever been annoyed by having to type /
reload confirm every time you build your plugin? This is basically the reason I have created this small tool that will automatically do this for you.
INSTALLATION
The project is divided into two different parts, the plugin that reloads the server and the Maven plugin that sends the reload request to the server.
INSTALL THE MAVEN PLUGIN
Installing the Maven plugin is quite easy. First of all add the following repository into your POM file repositories section:
Code (Text):
<repository>
<id>github</id>
<url>https://pkg.github.com/PauMAVA/PauMAVen</url>
</repository>
Then add the plugin after your assembly plugin:
Code (Text):
<plugin>
<groupId>me.PauMAVA</groupId>
<artifactId>DBAR.maven</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>request-reload</goal>
</goals>
<configuration>
<address>${bukkit.server.ip}</address>
<port>${bukkit.server.port}</port>
<password>${bukkit.server.password}</password>
</configuration>
</execution>
</executions>
</plugin>
The above plugin is executed after the install phase and will request a server reload. Note that the outputDirectory of your jar file on the assembly plugin should be the plugins folder of your server.
The Maven plugin takes three parameters:
- Address: server IP
- Port: port that the server plugin is using (NOT THE SERVER PORT)
- Password: DBAR server plugin's password. We will talk about this in the next section.
Here you have an example of a POM file I used for my UhcPlugin.
INSTALL THE SERVER PLUGIN
Installing the server plugin is as simple as copying the .jar that can be downloaded from this resource into the plugins folder and restart your server. This tool is designed in order to prevent bots or foreigners from automatically reloading your server. The server plugin has two security features:
- Password: a password that the maven plugin must provide in order for the server to accept the reload.
- Authorized hosts: a list of IPs that are allowed to send reload requests. If enabled, requests from IPs that are not in this list will be ignored.
You can change the password using the following command:
Code (Text):
/dbarpass <password> <repeatPassword>
The other parameters can be configured from the config file:
Code (Text):
port: 25678 # the port that you must use in the maven plugin
authorized: # list of authorized hosts
- 127.0.0.1
filterByIp: true # set to false to disable
requirePassword: true # set to false to disable
I highly discourage disabling both security methods. Use at your own risk!
After setting that your server will be automatically reloaded each time you build your plugin.