PHP code example of xxplugins / bstats-pmmp
1. Go to this page and download the library: Download xxplugins/bstats-pmmp 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/ */
xxplugins / bstats-pmmp example snippets
namespace your\name\space;
use pocketmine\plugin\PluginBase;
use xxFLORII\bStats\Metrics;
class YourPlugin extends PluginBase {
protected function onEnable() : void{
$pluginId = 1234; //ToDo: replace with your plugin ID from https://bstats.org
$metrics = new Metrics($this, $pluginId);
$metrics->scheduleMetricsDataSend();
}
}