EntityMoveEvent ?

Discussion in 'Plugin Development' started by TheDevZone, Oct 5, 2015.

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

    TheDevZone

    Does anyone know a event, which listens when a entity moves?
     
  2. Offline

    mythbusterma

    @TheDevZone

    There isn't a native one in Bukkit, however BkCommonLib provides one. What were you looking for?
     
  3. Offline

    TheDevZone

    Im making a zombiesurvival server, whatever, zombies shouldn't be allowed to enter the safezone.
    I want to throw them back to the map, if they enter the safezone.
     
  4. Offline

    mythbusterma

    @TheDevZone

    You can either use BkCommonLib or you can check the zombies on the server every few ticks and despawn them if they're in the safe zone.
     
  5. Offline

    TheDevZone

    Which of these two options in your opinion, are the most performant?
     
  6. Offline

    mythbusterma

    @TheDevZone

    That would depend on how EntityMoveEvent is implemented. I don't know, but honestly I don't think it will matter, as long as you're not checking every tick.
     
  7. Offline

    TheDevZone

    Last edited: Oct 5, 2015
  8. Offline

    boomboompower

    @TheDevZone if your issue is fixed, please mark this thread as solved :D
    Thank you -boom
     
  9. Offline

    Scimiguy

    If it become a performance issue, maybe you're better off checking for when Zombies target an Entity.. if the entity is inside the zone, it won't follow it?
     
  10. Offline

    RoboticPlayer

    @Scimiguy What if the zombie wasn't targeting an entity but it wandered in to the safezone?
     
  11. Offline

    Scimiguy

    Of course there's that main downside, but it should be far more performant, and they wouldn't be attacking anyone in there anyway.

    Otherwise yeah, just run a Scheduler every now and then to check like suggested above
     
  12. Offline

    TheDevZone

    My Server runs with 18.80-19 TPS & i installed dynmap. So it's really performant.
     
Thread Status:
Not open for further replies.

Share This Page