Create, update and troubleshoot AllayMC plugins in Java or other JVM languages. Use when (1) creating a new AllayMC plugin. (2) migrating an existing plugin to AllayMC. (3) troubleshooting an AllayMC plugin.
AllayMC is a third-party server software for Minecraft: Bedrock Edition written in Java. It provides a set of APIs for plugins to use. AllayMC is broadly divided into the following two modules:
Plugins in AllayMC are just like Bukkit plugins, they are loaded by the server when the server starts. Plugins are used to extend server functionality.
references/JavaPluginTemplate If the user haven't initialize the project.Before you begin, ask the user the following questions:
After the user answers the above questions, initialize the project metadata with the collected information.
Before that, determine whether the user is using JavaPluginTemplate, which is implemented by determining whether
the current project package name is org.allaymc.javaplugintemplate.
JavaPluginTemplate:org.allaymc.javaplugintemplate to the user provided group name.settings.gradle.kts to the user provided plugin name.build.gradle.kts, solve all the TODOs inside.JavaPluginTemplate:group, version (should start with 0.1.0), and description in build.gradle.kts.group in build.gradle.kts.build.gradle.kts.AllayGradle plugin, update the allay {} block in build.gradle.kts:
api to the target Allay API version.plugin.entrance to the fully qualified main class (or short suffix as used in the template).authors and website.AllayGradle plugin, create plugin.json per the docs in references/Allay/docs/tutorials/create-your-first-plugin.md.org.allaymc.api.plugin.PluginonLoad which is called before world loading.onEnable which is called after world loading.onDisable which is called when the server is stopping.isReloadable and implement reload.Understand the user's needs and read the documentation and code marked in the reference map below as needed.
./gradlew runServer for local testing when the AllayGradle plugin is configured../gradlew shadowJar to build the shaded jar.references/Allay/docs/tutorials and references/Allay/docs/advanced.references/JavaPluginTemplatereferences/Allay
references/Allay/api/src/main/java/org/allaymc/apireferences/Allay/server/src/main/java/org/allaymc/serverreferences/AllayGradle
references/AllayGradle/README.md@Nullable/@NonNull. Unless a method's Javadoc explicitly states that
a parameter or return value may be null, treat it as non-null.