My <?php: <?php namespace generate; use pocketmine\Server; use pocketmine\Player; use pocketmine\plugin\generate; use pocketmine\command\{Command, CommandSender}; class main extends generate { public function onEnable(){ } public function onCommand(CommandSender $player, Command $cmd, string $label, array $args) :bool { switch($cmd->getName()){ case "generate": if($player->hasPermissions)("use.generate")){ $money =rand(2, 120) EconomyAPI::getInstance()->addMoney($player, $money); $player->sendMessage("Dein betrag ist".$money); } break; } return true; } } My plugin.yml: name: Generate main: generate\pmmp\main api: [3.0.0, 4.0.0, 3.4.0] version: 0.1 author: jethstar commands: generate: description: "zum geldwert generieren" permissions: use.generate
[QUOTE = "HimbeersaftLP, Beitrag: 59952, Mitglied: 50"] Bitte genauer. [/ QUOTE] Ich weiß nicht, was im Plugin false but it didn't work, now I searching a answer of the problem why it's doesn't work. Entschuldigung für mein schreckliches Englisch from Germany
You need to have a use statement for the EconomyAPI class in your file. You also need to have the correct directory for the main class. Your plugin.yml says the path is generate\pmmp\main, but your main class only has namespace generate, which contradicts that.
Fix your API versions. 4.0.0 doesn't exist yet, and the other versions are unnecessary. Read https://github.com/pmmp/DeveloperDo...on-spec.md#common-pitfalls-and-misconceptions