Solved Spawn mobs with items from spawner

Discussion in 'Plugin Development' started by OkayName, Apr 7, 2021 at 3:23 PM.

  1. Online


    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!
  2. Offline


    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.
    davidclue likes this.
  3. Online


    Ok thanks, it worked. Im gonna mark the thread as solved!

Share This Page