<?php namespace JoinItem; use pocketmine\plugin\PluginBase; use pocketmine\event\Listener; use pocketmine\event\player\PlayerJoinEvent; use pocketmine\Player; use pocketmine\Server; use pocketmine\item\Item; use pocketmine\command\Command; use pocketmine\command\CommandSender; class Main extends PluginBase implements Listener { public function onEnable(){ $this->getLogger()->info("Successfully Enabled"); $this->getServer()->getPluginManager()->registerEvents($this, $this); } public function onDisable(){ $this->getLogger()->info("Successfully Disabled"); } public function onJoin(PlayerJoinEvent $event){ $player = $event->getPlayer(); //Player = Get Player That Doing The Event (Join Server) $player->getInventory()->clearAll(); $player->getInventory()->setItem(3, Item::get(280, 1, 1)); $player->getInventory()->setItem(5, Item::get(399, 1, 1)); } public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args) : bool{ if(strtolower($command->getName()) == "spawn"){ $sender->getInventory()->clearAll(); $sender->getInventory()->setItem(3, Item::get(280, 1, 1)); $sender->getInventory()->setItem(5, Item::get(399, 1, 1)); return true; } } } Not sure what is wrong with it please help