Hello I'm making a plugin that clears the inventory when the gamemode is changed. It does clear the inventory but it's not updating it so the players still sees the items even though they are gone. Code: PHP: public function onGameModeChange(PlayerGameModeChangeEvent $event){ $player = $event->getPlayer(); $event->getPlayer()->getInventory()->clearAll(); $player->sendMessage("Your inventory is cleared!"); } Is there a way to update the inventory so that the players won't see those ghost items?