Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-1014

Get spawner in CreatureSpawnEvent


    • Icon: New Feature New Feature
    • Resolution: Invalid
    • Icon: Minor Minor
    • None
    • None

      Currently, the only way of getting the spawner causing the CreatureSpawnEvent is by looping through nearby blocks and checking if it's a spawner.

      This is:
      1. Inefficient
      2. Bad because it may produce incorrect results if 2 spawners are placed next to each other.

      I request that a method is made in CreatureSpawnEvent named for example, getBlock() which returns null by default but if the spawn cause is due to a spawner, it returns the spawner block.

            Unassigned Unassigned
            KingFaris10 Faris Rehman
            1 Vote for this issue
            4 Start watching this issue