Hi .I am very new to Making plugins. I am learning Making plugins. Console is showing error loading plugin. Code: [Server thread/ERROR]: Could not load '/storage/emulated/0/PocketMine-MP/plugins/MyPlugin' in folder '/storage/emulated/0/PocketMine-MP/plugins/': yaml_parse(): scanning error encountered during parsing: mapping values are not allowed in this context (line 7, column 9) This is My `plugin.yml` file Code: name:MyPlugin main:VpsOP\MainClass api:3.9.5 version:1.01 author:VpsOP commands: text: description:"Text Command" And this is MainClass.php pls guide me i am new. PHP: <?php namespace VpsOP;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\Player;use pocketmine\plugin\PluginBase;use pocketmine\Server;use pocketmine\utils\TextFormat;class MainClass extends PluginBase{ public function onLoad(){ $this->getLogger()->info(TextFormat::WHITE . "I've been loaded!"); } public function onEnable(){ $this->getLogger()->info(TextFormat::DARK_GREEN . "I've been enabled!"); } public function onCommand(CommandSender $player,Command $cmd,string $label,array $args) : bool{ switch($cmd->getName()){ case "text": if($player instanceof Player){ $player->sendMessage("Hey Buddy!") return true; } } }
Code: name: MyPlugin main: VpsOP\MainClass api: 3.9.5 version: 1.01 author: VpsOP commands: text: description:"Text Command"
The error is in the plugin.yml, pretty much self-explained. You first have to fix that error and then you will be able to see if MainClass.php got any errors.
Stellen Sie sicher, dass Sie den richtigen Ordner in der Folge haben Main: author \ pluginname \ Main Namespace: Autor \ pl Name Und unter anderem nutzten sie die api 3.9.4