Code: name: CustomEnchants main: TB\Main version: 1.0 api: [3.0.1, 3.0.0] author: Teamblocket commands: ce: description: "Custom Enchant Command!" hey , so i made a plugin to test some custom enchant / custom name theorys and their are no errors but the commands won't output any messages or error . PHP: public function onCommand(CommandSender $sender, Command $command, $label, array $args) { switch (strtolower($command->getName())) { case "ce": if(isset($args[0])) { switch($args[0]) { case "gset": $this->onGSet($sender); return true; break; case "noting": $sender->sendMessage("Noting , lol"); return true; break; } } else { $sender->sendMessage(" -- Custom Enchants Help -- "); $sender->sendMessage(" - /ce gset"); $sender->sendMessage(" - /ce noting"); } return true;break; }}
yes PHP: <?phpnamespace CustomEnchants;use pocketmine\Server;use pocketmine\plugin\PluginBase;use pocketmine\Player;use pocketmine\event\Listener;use pocketmine\event\player\PlayerMoveEvent;use pocketmine\entity\Effect;use pocketmine\item\Item;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\command\CommandExecutor;class Main extends PluginBase implements Listener {
ok after converting the plugin into a phar i finally got some type of output , can someone tell me what this error means? Code: 30.04 15:43:39 [Server] CRITICAL ClassNotFoundException: "Class TB\Main not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 131
What? He didn't post his directory structure, just plugin.yml Maybe he forgot the src or TB folder? Anyways, you got the wrong namespace. If your main class is TB\Main, your namespace should be TB and not custom enchants
Code: 30.04 16:29:03 [Server] CRITICAL ClassNotFoundException: "Class TB\Sever not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144 ok i fixed every syntax error this is the last error , how do i fix it?
My guess is that you tried to use the pocketmine\Server class, but made a typo and put "Sever" instead.