PHP: <?php/* * Copyright (C) 2017 RTG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */namespace RTG\APIUpdater;use pocketmine\plugin\PluginBase;class Loader extends PluginBase { public function onEnable () { echo getcwd(); chdir("plugins"); $final = getcwd(); if ($dh = opendir($final)) { $file = scandir($final); if (in_array("DevTools", $file)) { $currentdir = getcwd(); chdir("DevTools"); $fin = getcwd(); $filee = scandir($fin); echo readfile("plugin.yml"); $check[] = file("plugin.yml"); unset ($check['api']); foreach ($check as $data) { file_put_contents("plugin.yml", $data); } } } } } I need help with loading changing the API number here and I know for a fact that changing the number doesn't work always as I'd need to update the lines. I think this could be used a learning plugin for me and also update API for minor changes in the main PMMP repository. Please help. I want to load plugin.yml as an array and then change it by unsetting it and setting is back but I've no idea. Thanks
I honestly feel this like something out of that section. If any staff willing to move, it'd be appreciated.