NoAI 1.8.x

With this API you can give Mobs NoAI!

  1. CraZyFlameDEV
    Tested Minecraft Versions:
    • 1.8
    Contributors:
    CraZyFlame
    This API can set Mobs still!

    What you have to do?

    Copy the API and paste it in you class of your plugin!
    Then you must write in another class the API path.

    Example:

    Code (Text):
                            if(args[0].equalsIgnoreCase("spawnVillager")) {
                                Villager v = (Villager) p.getWorld().spawnEntity(p.getLocation(), EntityType.VILLAGER);
                                v.setCustomName("§cBoots§f-§cVillager");
                                v.setCustomNameVisible(true);
                               
                                NoAi.setAiEnabled(v, false);
                            }
    NoAi is the path and to set AI Enable you must set the target mob at first.

    Example:

    Villager = v

    and then you set it to false, if you would to have it that they not go and so on, if you want that they go you must set it to true!


    I hope this API can some Developer help <3
    AfricanDev likes this.