I want to do that: When a player spawn an entity with a spawn egg, I want to send a message to the player, but I need to use EntitySpawnEvent, not PlayerInteractEvent
I do not think EntitySpawnEvent is suitable for that, but you can do this: PHP: public function onPlaceEggSpawn(PlayerInteractEvent $event){ if($event->getItem()->getID() === 383){ $event->getPlayer()->sendMessage("Message..."); } }