Mobs keep despawning!

Discussion in 'Plugin Development' started by Gabum, Jun 9, 2014.

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

    Gabum

    Hello!

    I'm currently working on a dungeon plugin.

    At the beginning, the mobs are created using a dungeon.load() method (Dungeon is a custom type I use). The Players are teleported into the dungeon, and then the mobs should be spawned. But that is not the case. For a reason, the mobs are removed all the time!

    If I load the Dungeon.load() method manually using a command from a location directly in the dungeon, the mobs will spawn correctly. But if I use the method just after the players have been teleported, they will all despawn!

    Any ideas how to fix that? Is there something like EntityDespawnEvent? Or is EntityDeathEvent also thrown? Help me please!
     
  2. The entity class should have a method like keeploaded or despawn, with a boolean as a argument. Try using that
     
  3. Offline

    RawCode

    read carefully javadocs about entityliving.

    mobs will despawn if there is no players around.
     
Thread Status:
Not open for further replies.

Share This Page