How do I prevent entities from moving?

Discussion in 'Plugin Development' started by jeussa, Jun 30, 2014.

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

    jeussa

    Hey all,

    Ive been wondering for some time how plugins like citizens and shopkeepers prevent certain entities from moving. If any of you guys know how this works, could they please reply the solution?

    Many thanks for you time :)
     
  2. Offline

    xTigerRebornx

    jeussa The replace the logic that makes the Entity move with logic that won't make it move.
    A little detail:
    Overriding the entity through NMS, finding which method does the movement (can include things like pathfinding and obfuscated methods), then replacing it with a method that simply does nothing rather then move, adding cross-version support for changes in obfuscation.

    Heirteir NMS = net.minecraft.server, not whatever you put :p
     
    jeussa likes this.
  3. Offline

    mine-care

    Try casting it to a living entity and there is the set speed method <i belive> havent used it for awhile but pay a try
     
Thread Status:
Not open for further replies.

Share This Page