will this code work? I'm trying to give the 'MainItems' on PlayerJoinEvent. PHP: 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->getPlayer()->setHealth(20); $player->getPlayer()->setFood(20); } now event PHP: 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); }