Server requirements
- PaperMC 1.20 or newer (up to the latest 1.21.x). RefineryCore compiles against the plain
paper-api, notpaperweight.userdev, since it only uses public Bukkit/Paper API — this means one build of RefineryCore loads on any Paper build in that range without needing a version-pinned jar. - Java 21 toolchain.
Adding the dependency
RefineryCore is published to Refinery’s Reposilite instance. Add the repository and dependency to your plugin’sbuild.gradle.kts:
VERSION with the latest published version.
Declaring the dependency in plugin.yml / paper-plugin.yml
Your plugin needs to load after RefineryCore, so declare it as a hard dependency:bukkitPluginYaml in Gradle:
Implementing RefineryPluginImplementation
Your plugin’s main class should implement RefineryPluginImplementation to get access to the command registry, console logging, and server-version helpers:
MyPlugin.java
RefineryPlugin
For the full RefineryCore lifecycle helpers, extend xyz.refineryteam.refinerycore.api.plugin.RefineryPlugin instead:
MyPlugin.java
RefineryPlugin provides getCrashHandler(), getConfigurationRegistry(), initializeConfiguration(...), and reloadPlugin(). Override reloadPlugin() when your plugin needs additional reload work, and call it from an admin command or another deliberate reload hook.
See the Overview page for what this interface provides.

