public function onCompletion(Server $server)
{
$chunks = $this->getResult();
$plugin = $server->getPluginManager()->getPlugin("MineReset");
if ($plugin instanceof MineReset and $plugin->isEnabled()) {
$level = $server->getLevel($this->levelId);
if ($level != null) {
foreach ($chunks as $hash => $chunk) {
Level::getXZ($hash, $x, $z);
$level->setChunk($x, $z, $chunk);
}
}
$plugin->getRegionBlocker()->freeZone($this->regionId, $this->levelId);
}
}