AllayMC

allaymc-plugin-dev

by @AllayMC in Tools
0
0
# Install this skill:
npx skills add AllayMC/AllaySkill

Or install specific skill: npx add-skill https://github.com/AllayMC/AllaySkill

# Description

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.

# SKILL.md


name: allaymc-plugin-dev
description: 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.
license: LGPL-2.1
metadata:
author: AllayMC


AllayMC Plugin Development

About AllayMC

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:

  • api: A set of interfaces provided for plugins.
  • server: An implementation of the api. Plugins usually don't have access to it.

About Plugin

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.

Workflow for a new plugin

1) Initialize the project

  • Use the official template at references/JavaPluginTemplate If the user haven't initialize the project.
  • If the user has already initialized the project, proceed to the next step.

2) Initialize Gradle and plugin metadata

Before you begin, ask the user the following questions:

  • What is the name of the plugin?
  • What is the package name used by the plugin?
  • What is the plugin author(s) name?
  • What is the website of the plugin?
  • What is the allay-api version used for the plugin?

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.

Case 1: If the project is using JavaPluginTemplate:

  • Rename package name from org.allaymc.javaplugintemplate to the user provided group name.
  • Set the project name in settings.gradle.kts to the user provided plugin name.
  • Update build.gradle.kts, solve all the TODOs inside.

Case 2: If the project is not using JavaPluginTemplate:

  • Update group, version (should start with 0.1.0), and description in build.gradle.kts.
  • Keep package of the plugin main class aligned with the value of group in build.gradle.kts.
  • Set the Java toolchain to 21 unless the user needs a different version in build.gradle.kts.
  • If the project is using AllayGradle plugin, update the allay {} block in build.gradle.kts:
  • Set api to the target Allay API version.
  • Set plugin.entrance to the fully qualified main class (or short suffix as used in the template).
  • Update authors and website.
  • If the project does not use the AllayGradle plugin, create plugin.json per the docs in references/Allay/docs/tutorials/create-your-first-plugin.md.

3) Implement the plugin entry class

  • Create the plugin entry class using plugin name and let it extends org.allaymc.api.plugin.Plugin
  • Override lifecycle methods in the entry class as needed:
  • onLoad which is called before world loading.
  • onEnable which is called after world loading.
  • onDisable which is called when the server is stopping.
  • If reloadable behavior is required, override isReloadable and implement reload.

4) Implement the plugin logic

Understand the user's needs and read the documentation and code marked in the reference map below as needed.

5) Build and run

  • Use ./gradlew runServer for local testing when the AllayGradle plugin is configured.
  • Use ./gradlew shadowJar to build the shaded jar.

Reference map

  • Allay documents (read on demand): references/Allay/docs/tutorials and references/Allay/docs/advanced.
  • JavaPluginTemplate: references/JavaPluginTemplate
  • Allay project source: references/Allay
  • Allay API: references/Allay/api/src/main/java/org/allaymc/api
  • Allay Server (API Implementation): references/Allay/server/src/main/java/org/allaymc/server
  • AllayGradle project source: references/AllayGradle
  • Usage Guide: references/AllayGradle/README.md

Notes

  • AllayMC is multithreaded, and special attention should be paid to multithreaded security issues when writing project code.
  • AllayMC currently does not use annotations such as JSpecify's @Nullable/@NonNull. Unless a method's Javadoc explicitly states that
    a parameter or return value may be null, treat it as non-null.
  • Don't overwrite defensive code, such as checking if an object that is explicitly marked as impossible null is null. Produce readable, easy-to-maintain code.

# README.md

AllayMC Plugin Dev Skill ⚙️

Build, update, and troubleshoot AllayMC plugins with a ready-to-use skill bundle. 🚀

Install 🧩

Clone this repository into your agent's skills directory and initialize submodules:

cd <skills-dir>
git clone --recurse-submodules [email protected]:AllayMC/AllaySkill.git allaymc-plugin-dev
  • For Claude Code, <skills-dir> is C:/Users/<your-username>/skills.
  • For OpenAI Codex, <skills-dir> is C:/Users/<your-username>/.codex/skills/.system.

If you already cloned it without submodules:

git submodule update --init --recursive

Update 🔄

Pull the latest changes and refresh submodules:

git pull --recurse-submodules

If submodules are out of date:

git submodule update --init --recursive

Use ✅

Invoke the skill by name or ask for AllayMC plugin development tasks:

Examples:
- "Use allaymc-plugin-dev to create a new AllayMC plugin skeleton."
- "Help me add commands and events to my AllayMC plugin."

What's Inside 📦

  • SKILL.md: The skill definition and workflow guidance.
  • references/Allay: AllayMC source and docs (submodule).
  • references/AllayGradle: Official AllayGradle plugin source (submodule).
  • references/JavaPluginTemplate: Official Java template (submodule).

The skill reads AllayMC sources and the official Java plugin template via submodules under references/.

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.