Download the PHP package nhanaz/libregrsp without Composer

On this page you can find all versions of the php package nhanaz/libregrsp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package libregrsp

libRegRsp

libRegRsp compiles a plugin's bundled resources into a Bedrock resource pack and registers it with Axolotl-PM. Version 1.0.6 declares plugin API 5.0.0 and requires PHP 8.1 or later. Consumer CI smoke-tests the declared API floor and one pinned Axolotl-PM release; the workflow records exact revisions. Intermediate 5.x releases are not verified.

Overview

The library reads assets from resources/<PluginName>/ or the legacy resources/<PluginName> Pack/ layout. It creates a .mcpack file in the plugin data directory and places the pack at the top of the server resource stack. A custom folder and output name are supported.

Requirements

Installation

Place a checkout of this virion at virions/libRegRsp next to your plugin project. Add a compatible declaration to its devtools.yml.

Build a standalone consumer PHAR with DevTools after copying the library's virion.yml, src/ and LICENSE into that directory. The PHP source is shaded into the consumer PHAR. The consumer must include its own resource pack files. A Composer consumer can depend on nhanaz/libregrsp when it supplies the Axolotl-PM API and resource files.

Usage

Store pack files under resources/MyPlugin/, including manifest.json at the folder root. Register the pack when the plugin starts and remove it when the plugin stops.

For a different resource folder, pass it as the second argument to compileAndRegister(). The third argument sets the output name without an extension. The output name must be a safe single file name. The fourth argument controls whether players must accept the resource pack, and defaults to true.

API

Method Result
compile(PluginBase $plugin, ?string $packFolder = null, ?string $zipFileName = null): ?string Returns the built pack path or null on failure.
register(PluginBase $plugin, ?string $zipPath = null, bool $forceRequired = true): void Adds a valid pack to the server stack.
unregister(PluginBase $plugin, ?string $zipPath = null): void Removes a pack registered by the current process and deletes its generated file.
compileAndRegister(PluginBase $plugin, ?string $packFolder = null, ?string $zipFileName = null, bool $forceRequired = true): void Compiles and registers a pack.

compile() disables the owning plugin if the data directory is unusable, the output name is unsafe, a resource cannot be read, or the generated pack is invalid. If a previous pack file exists, a failed replacement keeps it for recovery. register() sets Axolotl-PM's server-wide resource pack requirement to the supplied forceRequired value when the runtime exposes that API. On older API builds without a runtime setter, the existing force_resources value in resource_packs/resource_packs.yml must already match forceRequired; otherwise libRegRsp logs the required configuration and disables the plugin before compiling or changing the resource stack. Coordinate that server-wide setting with other plugins that manage resource packs.

Development and testing

Run composer install --no-scripts --no-plugins, composer validate --strict, composer phpstan and php -l src/NhanAZ/libRegRsp/libRegRsp.php. CI runs the same checks against locked Axolotl-PM development dependencies. DevTools builds a consumer PHAR. A clean server startup and pack lifecycle test verifies packaging. A Bedrock client is still needed to verify its presentation.

For migration from 1.0.4 or 1.0.5, preserve a copy of the previous consumer PHAR and generated pack, update the virion declaration to ^1.0.6, then rebuild the consumer. On runtimes without the resource requirement setter, configure force_resources in resource_packs/resource_packs.yml to match the consumer's forceRequired value before starting the server. If startup or pack loading fails, restore the previous PHAR and restart the server. Existing API method names and resource folder layouts remain supported.

License, credits and support

The PHP library is licensed under LGPL-3.0-or-later. See NhanAZ Discord or open an issue in this repository.


All versions of libregrsp with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-zip Version *
pocketmine/pocketmine-mp Version ^5.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nhanaz/libregrsp contains the following files

Loading the files please wait ...