Skip to main content
Alongside the larger frameworks, RefineryCore ships a few small, self-contained utilities that almost every plugin eventually needs.

TimeFormat

xyz.refineryteam.refinerycore.api.time.TimeFormat produces the human-friendly duration strings every cooldown, ban, and timer UI needs — plus the inverse parse for command arguments like 7d12h.
BanCommand.java
Supported units are y, mo, w, d, h, m, s, and ms; negative durations format as zero.

InventorySnapshot

xyz.refineryteam.refinerycore.api.inventory.InventorySnapshot captures a player’s complete inventory — storage contents, armor, and off hand — as an immutable object serializable to a single Base64 string. Useful for kits, backups, punishment rollbacks, and inventory viewers.
KitManager.java

ProxyMessenger

xyz.refineryteam.refinerycore.api.messaging.ProxyMessenger sends and receives plugin messages over the BungeeCord-compatible channel that Velocity also supports — the standard way for a backend Paper plugin to ask the proxy to move players between servers or broadcast custom payloads, with no proxy-side mod needed.
ServerSwitcher.java
On modern Velocity setups this requires settings.toml → proxies.velocity.enable = true. Also note the receiving Player in onMessage is whoever the proxy used to deliver the message — often arbitrary — so treat it as transport context, not as the message subject.