ResourcePackManager
Java reference for ResourcePackManager build version 2.4.8. Generated from source commit a6ada840a393. This reference describes that checkout, not a separate release.
Integration guide · All Java APIs · Source repository
Documented public and protected declarations include implementation types. Use the integration guide to choose extension points; visibility alone does not promise API stability.
Generated Java reference includes searchable classes, methods and signatures, with the source version and commit recorded for each module.
ResourcePackManager exposes a Java API that lets other plugins register their resource packs for merging at runtime.
Compile against com.magmaguy:ResourcePackManager:2.4.7 with provided or compileOnly scope, matching the installed plugin. This is the public Maven version checked for this refresh; current source is 2.4.7. The Java API index contains the repository and dependency examples. Declare depend: [ResourcePackManager] for a required integration. This is a Bukkit backend API; proxy plugins cannot use it to register packs on a remote backend.
Accessing the API
The API class is com.magmaguy.resourcepackmanager.api.ResourcePackManagerAPI. All methods are static.
Local pack example
This plugin registers an existing ZIP at plugins/ExamplePack/pack.zip when its descriptor names it ExamplePack. Place the ZIP there before starting the server.
package example;
import com.magmaguy.resourcepackmanager.api.ResourcePackManagerAPI;
import java.io.File;
import org.bukkit.plugin.java.JavaPlugin;
public final class ExamplePack extends JavaPlugin {
@Override
public void onEnable() {
File pack = new File(getDataFolder(), "pack.zip");
if (!pack.isFile()) {
getLogger().warning("Pack registration skipped: pack.zip is missing");
return;
}
ResourcePackManagerAPI.registerLocalResourcePack(
getName(), getDataFolder().getName() + "/pack.zip",
false, false, true, "");
}
}Registration returns void and replaces any previous registration under the same plugin name. It records a contribution; it does not immediately merge, host or send a pack. If the initial merge has already happened, request a reload once the contribution is ready, or have the administrator run /rspm reload. Avoid starting repeated reloads for every player or file change.
Call registration from the server thread and provide exactly one source. The registration method stores the input without validating that the pack can be downloaded or merged. Check the merge result and server logs when verifying delivery. There is no public unregister method in this facade.
Registering a Resource Pack
There are three registration methods depending on whether your pack is local, remote, or either.
registerResourcePack
ResourcePackManagerAPI.registerResourcePack(
String pluginName,
String localPath,
String url,
boolean encrypts,
boolean distributes,
boolean zips,
String reloadCommand
);Registers a resource pack that can come from a local path or a remote URL. Exactly one of localPath or url should be non-null.
registerLocalResourcePack
ResourcePackManagerAPI.registerLocalResourcePack(
String pluginName,
String localPath,
boolean encrypts,
boolean distributes,
boolean zips,
String reloadCommand
);Registers a resource pack from a local path relative to the plugins directory.
registerRemoteResourcePack
ResourcePackManagerAPI.registerRemoteResourcePack(
String pluginName,
String url,
boolean encrypts,
boolean distributes,
boolean zips,
String reloadCommand
);Registers a resource pack that will be downloaded from the provided URL.
Parameters
| Parameter | Description |
|---|---|
pluginName | The name of your plugin exactly as it appears in the plugin list. Case-sensitive. |
localPath | Relative path from the plugins directory to your resource pack file or folder. |
url | URL to download the resource pack from. |
encrypts | Reserved for future use. Currently does nothing. |
distributes | Reserved for future use. Currently does nothing. |
zips | Whether the resource pack is already zipped. If false, ResourcePackManager will zip it before merging. |
reloadCommand | The reload command for your plugin. Reserved for future use. |
Triggering a Reload
ResourcePackManagerAPI.reloadResourcePack();Reloads ResourcePackManager, which re-merges all registered packs and re-hosts the result if auto-hosting is enabled.
What This API Does Not Cover
Custom Bedrock entities are not registered through this class. A plugin contributes those by shipping native Bedrock entity assets under assets/<namespace>/rspm_bedrock_pack/ inside its Java pack; RSPM carries them into the generated Bedrock pack and the bundled Geyser extension registers the resulting definitions. See Bedrock conversion and Geyser extension & custom entities.
Bedrock conversion hints for items are also pack files rather than API calls: assets/<namespace>/rspm_item_bases/ declares base items, assets/<namespace>/rspm_item_java_only/ keeps items out of Bedrock conversion, and assets/<namespace>/rspm_item_particles/ attaches particles to held items. See Base items, Java-only items and Held-item particles.
Notes
Packs registered through the API participate in
priorityOrderthe same way built-in integrations do. Add your plugin name topriorityOrderinconfig.ymlto control where it sits in the merge order.If your plugin name is not listed in
priorityOrder, your pack receives the lowest priority.Registration should happen during your plugin's
onEnableor initialization, before ResourcePackManager finishes its own initialization and triggers the first merge.
Building from source
The source is at MagmaGuy/ResourcePackManager. It is a multi-module Maven project with the parent artifact ResourcePackManager-parent. Build from the repository root with JDK 21 and Maven, so the Velocity and BungeeCord modules are rebuilt before the final jar is shaded:
mvn -DskipTests packageThe only deployable file is resourcepackmanager-bukkit/target/ResourcePackManager.jar. When the MC_DIST_DIR environment variable is set, the build also copies it into that folder. The other modules produce internal jars that are shaded into it; they are not separate downloads. The plugin bytecode targets Java 17, which does not lower the Java version your server or proxy needs.
| Module | Purpose |
|---|---|
resourcepackmanager-bukkit | Bukkit/Paper plugin and final assembly. Shades MagmaCore and the modules below into the universal jar. |
resourcepackmanager-mixer | Java and Bedrock pack merging and conflict resolution |
resourcepackmanager-bedrock | Java-to-Bedrock pack conversion |
resourcepackmanager-bridge-common | Custom-entity messages between the plugin and the Geyser extension, and inspection, version checks and installation of the universal jar |
resourcepackmanager-geyser-bridge | Geyser extension entry point |
resourcepackmanager-http-common | HTTP server and client code for self-hosting, remote hosting and proxy fetches, plus network-key handling |
resourcepackmanager-proxy-common | Shared proxy code: network sync, Geyser deployment and proxy updates |
resourcepackmanager-velocity | Velocity entry point |
resourcepackmanager-bungee | BungeeCord entry point |
resourcepackmanager-system-tests holds fixtures for the proxy system tests. It is not a Maven module.
The universal jar carries four descriptors: plugin.yml for Bukkit/Paper, velocity-plugin.json for Velocity, bungee.yml for BungeeCord and extension.yml for Geyser. Before publishing a build, check that all four contain the parent POM version. The Velocity version is written in the @Plugin annotation of RspmVelocityPlugin rather than filled in from the POM.
MagmaCore is shaded into the jar. If you change MagmaCore locally, run .\gradlew.bat publishToMavenLocal in the MagmaCore project before building, so Maven uses your copy.