-
Notifications
You must be signed in to change notification settings - Fork 0
Platform_Spigot
In addition to Multipacks CLI, you can use Multipacks for Spigot, which allow pack bundling at server level, along with pack build result being shared for all Spigot plugins. An example would be reading Blockbench project file, generate models and play animations.
Installing Multipacks for Spigot is pretty easy. Go to Releases page, download the latest version of multipacks-spigot.jar and put it inside plugins/ folder. Spigot forks (Eg: Paper) are also supported.
Your main interest point would the the plugin configuration file, plugins/Multipacks/config.json:
{
"comment//0": "List of repositories that Multipacks will use. 'file:' always relatives to plugin data folder.",
"repositories": [
"file:packsRepository"
],
"comment//1": "The primary repository that plugins depending on Multipacks will use.",
"selectedRepo": 0,
"pack": {
"comment//0": "Master pack configuration. This is the one and only pack that all plugins will use.",
"comment//1": "Including other packs by editing multipacks.json inside your master pack.",
"enabled": false,
"folder": "my-pack",
"result": "my-pack-artifact.zip",
"serving": {
"comment//0": "This options is used for serving packs (Eg: over HTTP or copy to .minecraft/resourcespack)",
"comment//1": "Serving types can be installed by installing other Spigot plugins",
"enabled": false,
"comment//2": "Local serving type will try copying multipacks-spigot-generated.zip to .minecraft/resourcepacks. Using",
"comment//3": "/mp rebuild will copy that file once again.",
"servingType": "local"
}
}
}If you only want to use Multipacks as library, you can keep the current configuration. If you want to use Multipacks as pack bundler and you want other plugins to know your pack data, you have to enable master pack:
{
"pack": {
"enabled": true,
"folder": "path/to/pack-folder", "//": "Relative to plugin data folder",
"result": "my-bundled-pack.zip", "//": "Also relative to plugin data folder"
}
}If you have packs serving plugin, you can also enable serving options. Guide on how to use it depends on packs serving plugins documentation.
Multipacks Spigot only have 1 command: /multipacks and 3 subcommands: reload, rebuild and install. Here are permissions for each subcommands:
permissions:
multipacks.admin.*:
description: Allow all permissions
default: op
children:
multipacks.admin.command: true
multipacks.admin.reload: true
multipacks.admin.rebuild: true
multipacks.admin.install: true
multipacks.admin.command:
description: Allow player to use /multipacks
default: false
multipacks.admin.reload:
description: Allow player to reload Multipacks Spigot configuration
default: false
multipacks.admin.rebuild:
description: Allow player to rebuild master pack
default: false
multipacks.admin.install:
description: Allow player to install pack to repository
default: falseThis subcommand reload the entire plugin configuration, and will try rebuilding master pack if enabled.
This subcommand rebuild your master pack. Useful for making changes to only master pack. If you have enabled packs serving, this subcommand will also send you a new pack.
Install the pack to Spigot plugin packs repository.
The main entry point for all things related to Multipacks for Spigot is multipacks.spigot.MultipacksSpigot class. There are some static methods, but you must use .getInstance() to get the plugin instance and get access to more functionalities.
You can register your Multipacks plugins by using MultipacksPlugin.loadPlugin(). The behavior is exactly the same as loading your Multipacks plugin with CLI:
@Override
public void onLoad() {
MultipacksPlugin.loadPlugin(new MyMultipacksPlugin());
}Plugins must be loaded inside onLoad() stage, otherwise the pack will have to be rebuild when the server started.
Multipacks Wiki super-duper-useful sidebar
- Pack Post Processing
- Include
- Files manipulation
- Advanced
- Allocations