PHP code example of resourcepack / pipeline

1. Go to this page and download the library: Download resourcepack/pipeline library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

resourcepack / pipeline example snippets


use resourcepack\pipeline\ResourcePackPipeline;

public function onEnable(): void{
    $pipeline = new ResourcePackPipeline($this, $this->getResourceFolder());

    $pipeline->scan("packs/");
    $zips = $pipeline->zip();
    $pipeline->load($zips);
    $pipeline->log();
}