Monster De-spawn Event

Discussion in 'Plugin Development' started by JoshArgent, Apr 11, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    JoshArgent

    Hi,

    I'm aware there is no de-spawn event for living entities however I need a way to stop entities like creepers disappearing when it gets to Minecraft mid-day. I basically want monsters to never de-spawn. What's the best way to do this?

    Thanks,
    Josh.
     
  2. Offline

    macguy8

    JoshArgent
    Well, there is no despawn event, but I believe you can use...

    Entity.setRemoveWhenFarAway(false);
     
    JoshArgent likes this.
  3. Offline

    JoshArgent

    Thanks, that seems to of done the job. :)

    Just for reference: setRemoveWhenFarAway() is a member of LivingEntity, not Entity.
     
  4. Offline

    nitrousspark

    you can use the CreatureSpawnEvent then setRemoveWhenFarAway()
     
  5. Offline

    macguy8

Thread Status:
Not open for further replies.

Share This Page