Hi! I've been thinking about this plugin Here's my Main a.k.a "Review.php": PHP: <?phpnamespace RTG\GitHub;/* * All rights reserved RTGNetworkkk *//* Essentials */use pocketmine\Player;use pocketmine\Server;use pocketmine\plugin\PluginBase;class Review extends PluginBase { public function onEnable() { @mkdir($this->getDataFolder()); @mkdir($this->getDataFolder() . "/players"); $this->getLogger()->warning("[Review] DIR has been made!"); /* Execution */ $this->setExecutor(new MyCommand($this)); $this->getLogger()->warning("[Review] Everything has been loaded!"); } public function onDisable() { } } Here's MyCommand: PHP: <?phpnamespace RTG\GitHub\Command;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\command\CommandExecutor;use pocketmine\utils\Config;use RTG\GitHub\Review;use pocketmine\utils\TextFormat as TF;class MyCommand implements CommandExecutor { public function __construct(Review $plugin) { $this->plugin = $plugin; } public function onCommand(CommandSender $sender, Command $cmd, $label, array $param) { switch($cmd->getName()) { case "review": if(isset($param[0])) { switch($param[0]) { case "add": if($sender->hasPermission("review.add")) { $n = $sender->getName(); if(count($param) < 1) return false; $msg = trim(implode(" ", $param)); $this->cfg = new Config($this->getDataFolder() . "/players" . $n . "yml", Config::YAML); $this->cfg->setNested($msg); $sender->sendMessage("[Review] You review has been added!"); } else { $sender->sendMessage(TF::RED . "You have no permission to use this command!"); } return true; break; } } else { $sender->sendMessage("Usage: /review add {review}"); } return true; break; } } } Plugin.yml: PHP: name: Reviewerversion: 1.0.0main: RTG\GitHub\Reviewapi: 2.1.0commands: review: permission: review.add description: "Adds review!"permissions: review.add: default: op No errors has been encountered on Console... GitHub src: https://github.com/RTGNetworkkk/Reviewer
I spotted 4 errors, 1 is what @eDroid pointed out eariler, you need to PHP: use RTG\GitHub\Command\MyCommand; second is Code: Error: "Call to undefined method RTG\GitHub\Command\MyCommand::getDataFolder()" (EXCEPTION) in "src/RTG/GitHub/Command/MyCommand" at line 40 after fixing all those i got another error Code: Missing argument 2 for pocketmine\utils\Config::setNested(), called in src\RTG\GitHub\Command\MyCommand.php on line 42 And finally you did not save the config.
Why did you use getLogger()->warning()? Unless you use it to throw errors, wouldn't getLogger()->notice() be better?
PHP: name: Reviewerversion: 1.0.0main: RTG\GitHub\Reviewapi: 2.1.0commands: review: permission: review.add description: "Adds review!"permissions: review.add: default: op Please use spaces instead of tabs next time...