Spawner Spawning Check

Discussion in 'Spigot Plugin Development' started by MrAxeTv, Apr 20, 2017.

  1. Hello there people I have question can any one explain me how to get information about mob in EntityDeathEvent did that mob was spawned from spawner
  2. An LivingEntity does not contain the spawn origin, therefore you have to catch the CreatureSpawnEvent and get its SpawnReason. The SpawnReason equals SPAWNER if the mob was spawned by a spawner. Then you have to add the ID's of the mobs to an array and you will be able to check if the mob was spawned by a spawner.
  3. Useless arrays are not required, just a a metadata tag to the entity and save the information there
    • Agree Agree x 1