Hello, I need help with something, how can I remove an item from a players inventory that has a custom name?
If you want it to be when a player interacts with the item then do ~ PHP: public function onHeld(PlayerInteractEvent $e) { $player = $e->getPlayer(); $hand = $player->getInventory()->getItemInHand(); if($hand->getCustomName() === "CUSTOM NAME") { $player->getInventory()->remove($hand); else ~ PHP: $item = $player->getInventory()->getCustomName() === "CUSTOM NAME");$player->getInventory()->remove($item);