Hello there,I'm trying to make a kitGUI plugin but I need help with a code: I want it like when you tap an item that is already on your inventory by the cosmetics to run a command,e.g: If player tap diamond sword Then execute command kitgui
PHP: public function onInteract(PlayerInteractEvent $event){ $player = $event->getPlayer(); $in = $player->getInventory()->getItemInHand()->getCustomName(); if($in == "Item Name Here"){ $player->getServer()->dispatchCommand($player, "your_command_here"); }}