ResourcePackToolsPlugin
Incompatible con la versión actual de PocketMine-MP — Could not load plugin 'ResourcePackToolsPlugin': Incompatible API version (plugin requires one of: 3.0.0) · Probado en PocketMine-MP 5.50.0 (PHP 8.4.27).
ResourcePackTools
Tool (library) for easy use of resource packs from plugins
Command
command name description parameter permission alias only player
resourcepack Manage ResourcePack
resourcepacktools.command.resourcepack rp no
resourcepack register
Register the ResourcePack
r no
resourcepack unregisterbyindex
Unregister the ResourcePack by index
urbi no
resourcepack unregisterbyuuid
Unregister the ResourcePack by uuid
urbu no
resourcepack list Show the ResourcePack list pack(p):uuid(u)
l no
Example of plugin
- ResourceExample
Directory structure
plugin.phar(Plugin)/ ├ resources/ │ ├ info.png │ └ test/ │ └ server.png └ src/ └ ... test1.zip(ResourcePack)/ ├ server.png ├ manifest.json └ pack_icon.png
Generate ResourcePack
this, new Version(1, 0, 0)); pack->addFile("test/server.png", "server.png"); this->getDataFolder() . "test1.zip");
Register ResourcePack
ResourcePack::register($this->getDataFolder() . "test1.zip");
Update ResourcePack
When changing the contents of the ResourcePack, please change the version of the ResourcePack.
e.g.new Version(1, 1, 0);
This is similar to general ResourcePack development.
ResourcePack that have been downloaded once will be cached, but will be re-downloaded by increasing the version.