So I put the plugin in the plugin folder, then when I turn on my server, the plugin gets enabled but nothing appears, nothing like: - Commands do not work - getLogger () also does not work - Main is totally right - plugin.yml all right So I can not tell what's going on
PHP: <?phpnamespace da;use pocketmine\event\Listener;use pocketmine\plugin\PluginBase;use pocketmine\Server;use pocketmine\Player;use pocketmine\entity\Entity;use pocketmine\item\Item;use pocketmine\utils\Config;use pocketmine\block\Block;use pocketmine\inventory;use pocketmine\inventory\PlayerInventory;use pocketmine\inventory\BaseInventory;use pocketmine\item\enchantment\Enchantment;use pocketmine\item\enchantment\EnchantmentList;use pocketmine\item\enchantment\EnchantmentEntry;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\command\ConsoleCommandSender;use pocketmine\event\entity\EntityDamageEvent;use pocketmine\event\player\PlayerCommandPreprocessEvent;use pocketmine\event\player\PlayerJoinEvent;use pocketmine\event\block\BlockPlaceEvent;use pocketmine\event\player\PlayerInteractEvent;use pocketmine\plugin\PluginDescription;use onebone\economyapi\EconomyAPI;class main extends PluginBase implements Listener{ public $player; public function onEnable(){ $this->getServer()->getPluginManager()->registerEvents($this, $this); $this->getServer()->getLogger()->info("§aHydraCore foi ligada!"); @mkdir($this->getDataFolder()); $as = new Config($this->getDataFolder()."antispam.yml",Config::YAML,[ "time"=> 0 ]); $as->save(); $cm = new Config($this->getDataFolder(). "caixa.yml",Config::YAML, [ "basica" => 200000, "avancada" => 600000, "spawner" => 800000 ]); $cm->save(); $this->money = Server::getInstance()->getPluginManager()->getPlugin("EconomyAPI"); $this->getServer()->getCommandMap()->register("caixa", new caixa($this)); $this->getServer()->getCommandMap()->register("coords", new coords($this)); $this->getServer()->getCommandMap()->register("reportar", new reportar($this)); $this->getServer()->getCommandMap()->register("addcash", new addcash($this)); $this->getServer()->getCommandMap()->register("enviar", new enviar($this)); $this->getServer()->getCommandMap()->register("cash", new cash($this)); $this->getServer()->getCommandMap()->register("setcash", new setcash($this)); $this->getServer()->getCommandMap()->register("retirar", new retirar($this)); $this->getServer()->getCommandMap()->register("vida", new vida($this)); $this->getServer()->getCommandMap()->register("takecash", new takecash($this)); $this->getServer()->getCommandMap()->register("vserver", new vserver($this)); } public function onDisable(){} public function onInteract(PlayerInteractEvent $ev){ $p = $ev->getPlayer(); $item = $ev->getItem(); if($ev->getItem() == 339){ $i = $ev->getDamage(); if($item->getDamage() >= 0){ $sender->sendMessage("§l§5Banco§r§7 Foi depositado $$i em sua conta"); $sender->getInventory()->remove($ev->getItem()); $sender->getInventory()->addItem(Item::get($item->getId(), $item->getDamage(), $item->getCount() -1)); } } } getLogger() and the events and commands, don't work. Plugin.yml: Code: name: Plugin main: da\main api: 2.0.0 version: 1.0 authors: DanielYTK commands: reportar: description: Reportar um jogador permission: reportar.usar enviar: description: Enviar um item para outro jogador permission: enviar.usar vida: description: Regenerar sua vida permission: vida.usar caixa: description: Comprar uma caixa mágica permission: caixa.comprar cash: description: Ver o seu cash permission: cash.ver setcash: description: Setar o cash de um jogador permission: cash.setar addcash: description: Adicionar cash a um jogador permission: cash.add takecash: description: Remover o cash de um jogador permission: cash.remover vserver: description: Ver informações importantes do Servidor permission: vserver.ver coords: description: Ver suas coordenadas permission: coords.usar tpaon: description: Ativar suas solicitações de tpa permission: tpa.on tpaoff: description: Desativar suas solicitações de tpa permission: tpa.off tellon: description: Ativar as mensagens privadas permission: tpa.on telloff: description: Desativar as mensagens privadas permission: tpa.off
When you do /plugins, does it show up at all? Does it show up in red? If it's red, it may be an incompatible API issue.
`api: 2.0.0` doesn't look correct... PocketMine-MP will not load plugins with wrong API versions. Unless you're using a spoon, which always seem to think it's a good idea to just remove compatibility checks...