Reference
Project structure
The Maven layout, plugin.yml and the limits on project files.
Every Modloom project is a standard Maven plugin project. You can copy it out and keep building it anywhere.
Layout#
pom.xml
src/
main/
java/
dev/modloom/plugin/
ModloomPlugin.java
resources/
plugin.yml
config.yml (if the plugin has settings)
target/
plugin.jar (after a build)The agent adds classes, packages and resource files as the plugin grows, and may rename the starter class.
pom.xml#
The generated build file has these conventions:
- Coordinates: group
dev.modloom, artifactplugin, version1.0.0. The jar is namedplugin.jar. - Server API: declared as a
provideddependency for your engine and version, so it is not packed into your jar. - Java release: set for the version you target. See Engines and versions.
- Annotation processing is off. The build uses plain compilation.
Extra libraries can be added as ordinary Maven dependencies. If you need them at runtime inside your jar, the build has to shade them in, so ask the agent to do that explicitly.
plugin.yml#
plugin.yml tells the server about your plugin: its name, version, main class, commands and permissions.
name: ModloomPlugin
version: 1.0.0
main: dev.modloom.plugin.ModloomPlugin
api-version: "1.21"api-version is omitted for Minecraft versions before 1.13, and is set to match your target on newer ones. A jar is only accepted as a download if it contains a plugin.yml and at least one compiled class.
What the agent can see#
On each run the agent works with the text files in your project. Binary files, build output and very large files are left alone, and these folders are ignored: .git, .modloom, target, .cache and node_modules.
Projects have limits on the size of a single file, the total size of the source, and the number of files. If you hit one, split big files or move assets out of the project.
Maven only#
Modloom builds with Maven. A Gradle build file in your project is readable text, but it is not used to produce the jar.