<?php __HALT_COMPILER(); ?>
r                     src/metowa1227/MovingData3.php/  =A]/  Pj      
   plugin.ymln   =A]n   -B      <?php
namespace metowa1227;

use pocketmine\plugin\PluginBase;
use pocketmine\utils\Config;
use metowa1227\moneysystem\api\core\API;

class MovingData3 extends PluginBase
{
	public function onEnable()
	{
		$this->getLogger()->notice("データの引っ越しを開始します。");
		$file = new Config($this->getDataFolder() . "Account.yml", Config::YAML);

		foreach (API::getInstance()->getAll() as $data) {
			$file->set($data["name"], $data["money"]);
			$this->getLogger()->info($data["name"] . " さんのデータ移行が完了しました");
		}
		$file->save();
		$this->getLogger()->notice("データの引っ越しが完了しました。");
		$this->getLogger()->notice("このプラグインと旧MoneySystemを抜き、新バージョンのMoneySystemへ移行してください。");
		$this->getLogger()->notice("旧MoneySystemのデータファイルを削除し、一度起動した後生成されたAccount.ymlとこのプラグインのAccount.ymlを入れ替えてください。");
		$this->getServer()->shutdown();
	}
}
name: MovingData3
main: metowa1227\MovingData3
version: 1.0
api: 3
author: metowa1227
depend: MoneySystembc$kxc`n   GBMB