I have a plugin named Core and it is crashing for an unknown reason. The error I get is: Code: 2017-04-13 [09:20:06] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected public (T_PUBLIC)" (EXCEPTION) in "myzip:///Core.zip#src/Core/Main" at line 110 Code of the plugin: PHP: <?phpnamespace Core;use pocketmine\event\player\PlayerMoveEvent;use pocketmine\level\particle\FlameParticle;use pocketmine\plugin\PluginBase;use pocketmine\scheduler\PluginTask;use pocketmine\math\Vector2;use pocketmine\math\Vector3;use pocketmine\nbt\tag\IntTag;use pocketmine\event\Listener;use pocketmine\command\Command;use pocketmine\command\CommandSender;use pocketmine\utils\TextFormat as C;use pocketmine\Player;use pocketmine\Server;use pocketmine\event\player\PlayerDeathEvent;use pocketmine\utils\Config;use pocketmine\event\player\PlayerChatEvent;use pocketmine\event\player\PlayerJoinEvent;use pocketmine\event\player\PlayerQuitEvent;use pocketmine\event\player\PlayerInteractEvent;use pocketmine\event\player\PlayerItemHeldEvent;use pocketmine\event\player\PlayerDropItemEvent;use pocketmine\event\block\BlockBreakEvent;use pocketmine\event\block\BlockPlaceEvent;use pocketmine\item\Item;use pocketmine\utils\TextFormat;use pocketmine\event\entity\EntityTeleportEvent;class Main extends PluginBase implements Listener { public $prefix = TextFormat::GRAY."[".TextFormat::AQUA."Lobby".TextFormat::GRAY."] "; public function onEnable(){ $this->getLogger()->info($this->prefix.C::GREEN."Enabled!"); $this->getServer()->getPluginManager()->registerEvents($this, $this); $this->getServer()->getScheduler()->scheduleRepeatingTask(new Scoreboard($this), 20); } public function MainItems(Player $player){ $player->getInventory()->clearAll(); $player->getInventory()->setItem(0, Item::get(345)->setCustomName(C::BOLD.C::GREEN."Teleporter")); $player->getInventory()->setItem(2, Item::get(339)->setCustomName(C::BOLD.C::GOLD."Info")); $player->getInventory()->setItem(6, Item::get(280)->setCustomName("§eHide §aPlayers")); $player->removeAllEffects(); $player->getPlayer()->setHealth(20); $player->getPlayer()->setFood(20); } public function killm(PlayerDeathEvent $event) { $event->setDeathMessage(""); } public function TeleportItems(Player $player){ //Teleport $player->getInventory()->clearAll(); $player->getInventory()->setItem(3, Item::get(280)->setCustomName(C::BOLD.C::BLUE."SkyPvP")); $player->getInventory()->setItem(8, Item::get(341)->setCustomName(C::BOLD.C::RED."Back")); $player->getInventory()->setItem(0, Item::get(267)->setCustomName(C::BOLD.C::RED."Hypixel")); $player->getInventory()->setItem(2, Item::get(19)->setCustomName(C::BOLD.C::GREEN."Plots")); $player->removeAllEffects(); $player->getPlayer()->setHealth(20); $player->getPlayer()->setFood(20); } public function onJoin(PlayerJoinEvent $event){ //OnJoin $player = $event->getPlayer(); $name = $player->getName(); $ds = $this->getServer()->getDefaultLevel()->getSafeSpawn(); $player->setGamemode(0); $player->teleport($ds); $event->setJoinMessage(""); $this->MainItems($player); $player->setGamemode(0); if($player->isOP()){ $event->setJoinMessage(C::RED.$name.C::AQUA." joined the game"); } } public function onQuit(PlayerQuitEvent $event){ $player = $event->getPlayer(); $event->setQuitMessage(C::RED.$name.C::AQUA." has left the game"); } public function onCommand(CommandSender $sender, Command $cmd, $label, array $args){ $name = $sender->getName(); switch ($cmd->getName()){ case "info": if(!empty($args[0])){ if($args[0] == "ranks"){ $sender->sendMessage($this->prefix . "§aYou can buy a rank at buildmcpeplus-donate.tk"); return true; } if($args[0] == "server"){ $sender->sendMessage($this->prefix . "§aThis server is a copy of the §9Build§aMcpe server. §9Build§aMcpe server IP: buildmcpe.eu PORT: 19132"); return true; }else{ $sender->sendMessage($this->prefix. "§a/info ranks|server"); return true; } } } public function onInteract(PlayerInteractEvent $event){ $player = $event->getPlayer(); $name = $player->getName(); $item = $player->getInventory()->getItemInHand(); $itemid = $item->getID(); $block = $event->getBlock(); if($item->getName() == C::BOLD.C::GOLD."Teleporter"){ $this->TeleportItems($player); } elseif ($item->getName() == C::BOLD . C::GOLD . "Info"){ $player->sendMessage($this->prefix . "§aUsage: /info ranks|server"); } elseif ($item->getName() == C::BOLD . C::RED . "Back"){ $this->MainItems($player); } elseif ($item->getName() == C::BOLD . C::GREEN . "Plots"){ $this->MainItems($player); $player->teleport($level->getSafeSpawn(Plots)); $player->teleport(new Vector3($x, $y, $z, $level)); } elseif ($item->getName() == C::BOLD.C::RED."Hypixel"){ $this->MainItems($player); $player->teleport($level->getSafeSpawn(§l§cHypixel)); $player->teleport(new Vector3($x, $y, $z, $level)); } elseif ($item->getName() == C::BOLD.C::AQUA."SkyPvP"){ $this->MainItems($player); $player->teleport($level->getSafeSpawn(SkyPvP)); $player->teleport(new Vector3($x, $y, $z, $level)); } elseif ($item->getCustomName() == "§eHide §aPlayers") { $player->getInventory()->remove(Item::get(280)->setCustomName("§eHide §aPlayers")); $player->getInventory()->setItem(6, Item::get(369)->setCustomName("§eShow §aPlayers")); $player->sendMessage($this->prefix . "§aDisabled Player Visibility!"); $this->hideall[] = $player; foreach ($this->getServer()->getOnlinePlayers() as $p2) { $player->hideplayer($p2); } } elseif ($item->getCustomName() == "§eShow §aPlayers"){ $player->getInventory()->remove(Item::get(369)->setCustomName("§eShow §aPlayers")); $player->getInventory()->setItem(6, Item::get(280)->setCustomName("§eHide Players")); $player->sendMessage($this->prefix . "§aEnabled Player Visibility!"); unset($this->hideall[array_search($player, $this->hideall)]); foreach ($this->getServer()->getOnlinePlayers() as $p2) { $player->showplayer($p2); } } } public function onItemHeld(PlayerItemHeldEvent $event){ $player = $event->getPlayer(); $name = $player->getName(); $item = $player->getInventory()->getItemInHand()->getID(); switch($item){ case 10: $player->getInventory()->setItemInHand(Item::get(Item::AIR, 0, 0)); $player->sendMessage($this->prefix.TextFormat::RED." You cannot use lava"); return true; case 11: $player->getInventory()->setItemInHand(Item::get(Item::AIR, 0, 0)); $player->sendMessage($this->prefix.TextFormat::RED." You cannot use lava"); return true; } }}
PHP: public function MainItems(Player $player){$player->getInventory()->clearAll();$player->getInventory()->setItem(0, Item::get(345, 0, 1)->setCustomName(C::BOLD.C::GREEN."Teleporter");$player->getInventory()->setItem(2, Item::get(339, 0, 1)->setCustomName(C::BOLD.C::GOLD."Info");$player->getInventory()->setItem(6, Item::get(280, 0, 1)->setCustomName("§eHide §aPlayers");$player->removeAllEffects();$player->setHealth(20);$player->setFood(20);} try that