Solved Silent PNJ

Discussion in 'Plugin Help/Development/Requests' started by Hugi21, Sep 29, 2015.

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

    Hugi21

    Hello today I ask for help and ask if it is possible to mute a villager and invulnerable, just as in this command:

    thank you in advance
    Hugi21
     
  2. Online

    timtower Moderator Moderator

    @Hugi21 And where would those villagers come from?
     
  3. Offline

    Hugi21

    @timtower from this:

    Code:
    Villager vil = e.getBlockPlaced().getWorld().spawn(locVil, Villager.class);
    yes I summon the villager in PlaceBlockEvent
     
  4. Online

    timtower Moderator Moderator

    @Hugi21 I believe that it is possible somehow, I don't know how though. Might be metadata.
    Probably best to wait for somebody that knows entity stuff to come along.
     
  5. Offline

    Hugi21

    @timtower ok thanks your help is very precious on my requests and sorry for my english I am French
     
  6. Online

    timtower Moderator Moderator

    Glad that I did something? :p And your English isn't that bad to be honest.
     
  7. Offline

    Hugi21

    I found the solution
    Code:
    Entity mcEntity = ((CraftEntity) entity).getHandle();
            mcEntity.b(true);
     
  8. Offline

    I Al Istannen

    @Hugi21 A more ugly but probably version proof way would be executing a "/entitydata" command at the name, type and/or the coordinates of the villager and add the "{Silent:1b}" tag.
     
Thread Status:
Not open for further replies.

Share This Page