load Saved yml config on website. and list up. is this possible? For ex, here's the yml Code: test: item: - 3 - 5 type: 1 and load on website, Test has 3, 5 item and type is 1
You can load the data from website in onEnable and save it. According to @shoghicp, it is acceptable to execute long thread-blocking operations when the plugin is enabled, so you don't need to use a task for that.
You mean load from website, right? 1. Use Utils::getURL() to download the raw content of the web-served file as a string 2. Use yaml_parse() to parse the string into an array See this example that parses the default pocketmine.yml file using the GitHub repo: PHP: use pocketmine\utils\Utils;public function onEnable(){ $url = "https://raw.githubusercontent.com/PocketMine/PocketMine-MP/master/src/pocketmine/resources/pocketmine.yml"; $raw = Utils::getURL($url); $parsed = yaml_parse($raw); var_dump($parsed["debug"]); Output: Code: array(2) { ["level"]=> int(1) ["commands"]=> bool(false) }