Having problem with line 28. It's the transfering server thing PHP: <?phpnamespace gamer\trasnfering;use pocketmine\plugin\PluginBase;use pocketmine\event\player\PlayerTransferEvent;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\command\deafults\TransferServerCommand;use pocketmine\player;use pocketmine\server;use pocketmine\utils\TextFormat as clr;class Main extends PluginBase { public function onEnable() { $this->getLogger()->info(clr::GREEN . "Transfering Enabled"); } public function onCommand(CommandSender $sender, Command $command, $label, array $args) { switch ($command->getName() ) { case "Practice": $sender->transfer("pvplegend.us.moo",19132, "Transferring to PvP server!"); break; public function onDisable() { $this->getLogger()->info(clr::RED . "Transfering Disabled"); }}
Facepalm section. This is not a PocketMine issue, nor does it have to do with the API. This is a syntax error. Look it up yourself and learn how to use brackets.
PHP: <?phpnamespace gamer\trasnfering;use pocketmine\plugin\PluginBase;use pocketmine\event\player\PlayerTransferEvent;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\command\deafults\TransferServerCommand;use pocketmine\player;use pocketmine\server;use pocketmine\utils\TextFormat as clr;class Main extends PluginBase { public function onEnable() { $this->getLogger()->info(clr::GREEN . "Transfering Enabled"); } public function onCommand(CommandSender $sender, Command $command, $label, array $args) { switch($command->getName()) { case "Practice": $sender->transfer("pvplegend.us.moo",19132, "Transferring to PvP server!"); return; break; } } public function onDisable() { $this->getLogger()->info(clr::RED . "Transfering Disabled"); }}
learn php but i love helping so here you go ^*^ , pretty please learn PHP First and use an IDE to find syntax error etc