I will write a feedback plugin.. PHP: public function onEnable() { $this->getServer()->getPluginManager()->registerEvents($this, $this); @mkdir($this->getDataFolder()); $this->saveDefaultConfig(); $this->reloadConfig(); } public function onCommand(CommandSender $sender, Command $command, $label, array $args) { if($command->getName() === "feedback" && isset($args[0])) { $name = $sender->getName(); $this->getConfig()->set("Name: ".$name); $this->getConfig()->set("Feedback: ".$args[0]); $this->getConfig()->save(); } } But I get this error: Code: [15:56:52] warning> RuntimeException: "yaml_parse(): end of stream reached without finding document 0" (E_WARNING) in "/src/pocketmine/utils/Config" at line 148 Does anyone know why? ._. Thanks!
At least put these: Code: --- ... Otherwise, YAML will throw an exception because it found an entirely empty document that it cannot even find anything that suggests that it might be a YAML file.
Thanks! But now I get this error :/ Code: [18:10:38] system> Enabling FeedbackPlugin v1.0.0 [18:10:38] notice> InvalidArgumentException: "Argument 1 passed to pocketmine\utils\Config::setDefaults() must be of the type array, null given, called in phar://C:/Users/allesklar/Desktop/Minecraft PE/PocketMine_Plugins/Test-Server/PocketMine-MP.phar/src/pocketmine/plugin/PluginBase.php on line 266 and defined" (E_RECOVERABLE_ERROR) in "/src/pocketmine/utils/Config" at line 419 [18:10:38] system> Disabling FeedbackPlugin v1.0.0
You expect an empty array in your YAML? Maybe you should put this: Code: --- [] ... This is what yaml_emit([]) would generate.