Best way to watch monster movement?

Discussion in 'Plugin Development' started by nossr50, Jun 28, 2011.

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

    nossr50

    Is there a good way to watch monster movement in bukkit? I was hoping for a monster/creature movement hook but it doesn't seem to exist.
     
  2. Offline

    Minecraft93

    http://jd.bukkit.org/apidocs/index.html heres all the info u need to find a way to move entities :D
     
  3. Offline

    nossr50

    I don't want to move entities, I want to watch their movement... in other words, when they move, I want to know about it.
     
  4. Offline

    IceReaper

    i would like to know the same. how to watch when they move, and possibly prevent movement.
     
  5. Offline

    matejdro

    Make a loop that loops through all entities in the world and check their location. You may store their location in HashMap and then compare it to see if they moved.
     
  6. Offline

    DrBowe

    While I know this would work...I feel like it would be EXTREMELY inefficient and cause a lot of unecessary weight on the server.

    However, I can't really think of another way to do it...
    Someone should make an issue and ask for an EntityMoveEvent
     
  7. Offline

    matejdro

    Well, you can put it in separate thread to lift weight from server. But yeah, AFAIK there is no another way. I was looking for that too but then dropped searching and just went with previously mentioned solution.
     
  8. Offline

    IceReaper

    guess going that way is actualy the only possible one.. *sigh*
     
  9. Offline

    WinSock

    If you don't mind depending on another plugin, my plugin Crowd Control has the event built in that you can register and hook into.
     
    Pencil likes this.
Thread Status:
Not open for further replies.

Share This Page