RefineryCore targets PaperMC and compiles against the plain
paper-api (no NMS), meaning a single build loads on any Paper version from 1.20 onward through the latest 1.21.x.Why a core plugin?
Without a shared core, every Refinery plugin would independently hand-roll:- A reflection-based command framework (or repeat boilerplate
CommandExecutorclasses) - A GUI click-handling listener
- A YAML config mapper
- A cooldown tracker
- A per-player scoreboard manager
- A database connection pool
xyz.refineryteam.refinerycore and get all of the above for free.
Package layout
All public API lives underxyz.refineryteam.refinerycore.api, split by concern:
The plugin main class
Every Refinery plugin’s main class implementsRefineryPluginImplementation (rather than extending some shared abstract plugin class), which is what wires in the command registry, MiniMessage-based logging, and server-version detection as default interface methods:
RefineryCorePlugin.java
RefineryPluginImplementation gives your plugin, for free:
reload()— reloads the Bukkit config by default; override for custom reload logicgetConsoleSender()/logMessage(String)— sends MiniMessage-formatted console outputgetPluginManager()— shorthand forBukkit.getPluginManager()getCommandRegistry()— a per-plugin-classCommandRegistrysingletongetServerImplementation()— the resolvedServerImplementationfor the running server
Where to go next
If you’re building a plugin on top of RefineryCore, a typical order to read the docs in:- Installation — add RefineryCore as a dependency
- Commands — register your plugin’s commands
- Configuration — map a YAML config to a Java class
- GUI Framework — build inventory menus
- Database and Temporary Storage — persist and cache data

