A Bukkit plugin which allows loading, unloading and compiling java projects in runtime.
A Bukkit plugin which allows loading, unloading and compiling java projects in runtime.
Click here to join our Discord server.
Permission | Description |
---|---|
javaloader.use | All usage |
Place the JavaLoader jar file in the <server dir>/plugins
directory of your Bukkit server. When you start your server and no projects currently exist, an example project will be put in the <server dir>/plugins/JavaLoader/JavaProjects
directory. From looking at this example project, you will be able to see how to set up a project for JavaLoader.
io.github.pieter12345.javaloader.bukkit.JavaLoaderBukkitProject
. The usual org.bukkit.plugin.java.JavaPlugin
class functionalities from Bukkit are implemented in the io.github.pieter12345.javaloader.bukkit.JavaLoaderBukkitProjectPlugin
class which can be obtained using JavaLoaderBukkitProject
's getPlugin()
method.public void onLoad()
and public void onUnload()
, which are called when the project is being loaded and unloaded respectively.public String getVersion()
, which should return the version of your project (e.g. "0.0.1-SNAPSHOT"). This method is invoked before the onLoad()
method is invoked and it is advised to hard-code this.CommandExecutor
and TabCompleter
interfaces for command handling and tab complete handling.public BukkitCommand[] getCommands()
method in the projects main class. These commands will be inserted before the onLoad()
method is invoked, so it is advised to hard-code these commands.<server dir>/plugins/JavaLoader/JavaProjects/<your project>/dependencies.txt
file with line-seperated dependency descriptors.jar -scope path
where scope is optional and can be provided
or include
(defaults to include
) and path is the path to the .jar file. If the path starts with a dot, the relative path is taken from the project directory.project projectName
where projectName is the name of the project.plugin pluginName
where pluginName is the name of the plugin as known by Bukkit.mclib libName
where libName is the name of the bundled Minecraft library jar (including the version number and excluding the .jar
file extension). Placing libName between <>
will cause it to be handled as a regex, matching 0 to many bundled Minecraft library jars (example: mclib <spigot-api-.*>
to include Spigot API or mclib <.*>
to include all bundled Minecraft libraries).project
> include scope dependencies
> project dependencies (including their dependencies)
> Server main ClassLoader (Bukkit classes and possibly Bukkit plugin classes)
> JavaLoader plugin classloader (Bukkit plugin classes)
.You can contribute to this project by reporting bugs and requesting features using the issue tracker on GitHub. Pull requests are very much welcome, but do keep in mind to discuss changes beforehand to increase the chance of pull requests being accepted.