#!/usr/bin/php config = $remote_config["custom"]; $this->saveConfig(); $this->updateConfigFile(); } public function updateConfigFile() { $path = dirname(__DIR__, 2) . "/networks/custom.json"; $current_config = @file_get_contents($path); $new_config = json_encode($this->config); if($current_config !== $new_config) { file_put_contents($path, $new_config); } } public function onInit(PluginContext $context): void { parent::onInit($context); $this->updateConfigFile(); } }