Skip to main content
RefineryCore is the foundation plugin behind every Refinery Minecraft project. It isn’t a gameplay plugin on its own — it’s a library of small, focused APIs (commands, GUIs, configuration, databases, scoreboards, and more) that other plugins like RefineryCombat, StaffHunt, and Monarchs build on top of, so those plugins don’t each reinvent the same plumbing.
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 CommandExecutor classes)
  • A GUI click-handling listener
  • A YAML config mapper
  • A cooldown tracker
  • A per-player scoreboard manager
  • A database connection pool
RefineryCore centralizes all of it behind clean, annotation-driven or fluent-builder APIs, so downstream plugins only depend on xyz.refineryteam.refinerycore and get all of the above for free.

Package layout

All public API lives under xyz.refineryteam.refinerycore.api, split by concern:

The plugin main class

Your plugin can either extend RefineryPlugin, which initializes a CrashHandler and exposes the configuration registry, or implement RefineryPluginImplementation directly for the lighter interface-only approach. The interface provides the command registry, MiniMessage-based logging, and server-version detection as default methods:
RefineryCorePlugin.java
RefineryPluginImplementation gives your plugin, for free:
  • reload() — reloads the Bukkit config by default; override for custom reload logic
  • getConsoleSender() / logMessage(String) — sends MiniMessage-formatted console output
  • getPluginManager() — shorthand for Bukkit.getPluginManager()
  • getCommandRegistry() — a per-plugin-class CommandRegistry singleton
  • getServerImplementation() — the resolved ServerImplementation for the running server
RefineryPlugin additionally provides:
  • getCrashHandler() — a plugin-bound CrashHandler
  • getConfigurationRegistry() — the shared RefineryConfigurationRegistry
  • initializeConfiguration(configuration) — saves a configuration’s defaults, registers it, and returns the same instance
  • reloadPlugin() — reloads the Bukkit config and all configurations registered for the plugin

Where to go next

If you’re building a plugin on top of RefineryCore, a typical order to read the docs in:
  1. Installation — add RefineryCore as a dependency
  2. Commands — register your plugin’s commands
  3. Configuration — map a YAML config to a Java class
  4. GUI Framework — build inventory menus
  5. Database and Temporary Storage — persist and cache data
  6. Crash Reporting, Localization, and Utilities — polish the rest