Help with Ender Dragon knockback!

Discussion in 'Spigot Plugin Development' started by Bombastickj, Jun 3, 2015.

  1. HELP! I programmed a plugin that you can fly with the Ender Dragon but if i fly through entities they will be knocked back also by armor stands!

    this is my code to prefer that but it only works if you place the armor stands again after a reload /stop.

    Code (Text):
    for(Entity ent : e.getNearbyEntities(10, 10, 10)) {
                                if(ent instanceof ArmorStand) {
                                    ent.setVelocity(new Vector(0, 0, 0));
                                }
                               
                                if(plugin.Mounts.contains(ent.getPassenger())) {
                                    ent.setVelocity(new Vector(0, 0, 0));
                                }
                               
                            }
    thx for helping!
    Bombastickj.