Hello. I am developing a plugin and I am getting this error: Code: 2019-05-12 [07:38:05] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected '}'" (EXCEPTION) in "plugins/ThruCommand/src/ThruCommand/SJames/Main" at line 22 I don't understand why. I have an if-statement 2 lines above. Any help? Thanks. PHP: <Main file><?phpnamespace ThruCommand\SJames;use pocketmine\Sever;use pocketmine\Player;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\plugin\PluginBase;use pocketmine\level\position;use pocketmine\Vector3;use pocketmine\utils\TextFormat as c;class Main extends PluginBase{ public function onEnable(){ } public function onCommand(CommandSender $player, Command $cmd, String $label, array $args){ switch($cmd -> getName()){ case "thru" ; if (!($player instanceof Player)){ $sender->sendMessage(TextFormat::DARK_RED . "Please run this command in-game.") }else{ #line 22 $distance = 1; switch($player->getTargetBlock($distance)); case "stone" $player->sendMessage(TextFormat::GREEN."You are looking at Stone" } return true; } return true; }}
PHP: $sender->sendMessage(TextFormat::DARK_RED . "Please run this command in-game.") 1) missing ; PHP: $player->sendMessage(TextFormat::GREEN."You are looking at Stone" 2) missing ); 3) missing endswitch;