Hey! I recently got into plugin development, and I decided to start off with something simple. I decided to make custom spawners, which would spawn mobs with items. I tried looking around, but I couldn't find a solution on how to spawn mobs with items or armor, only how to spawn regular mobs. Thanks in advance!
You catch SpawnerSpawnEvent and use getEntity to get the entity. From there you can use getEquipment to get the EntityEquipment (object) for the entity, and then use something like setItemInHand.