ArmorStands

Discussion in 'Plugin Development' started by WolfMage1, Sep 1, 2016.

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

    WolfMage1

    As we all know Minecraft only shows custom names for entities when you have your cross hairs on them, Well to get the names to show like normal Minecraft name plates I decided to use armor stands.

    However it doesn't seem to be actually spawning the armor stand and I'm really confused why

    Code:
    ArmorStand stand=entity.getLocation().getWorld().spawn(entity.getLocation(), ArmorStand.class);
            stand.setVisible(true);
            stand.setCustomName("Test");
            stand.setCustomNameVisible(true);
            stand.setGravity(false);
            entity.setPassenger(stand);
     
  2. Offline

    Zombie_Striker

    @WolfMage1
    setGravity stops all velocity changes, and may interfere with the setPassager line. Try removing the setpassager line and seeing if the armourstand appears.
     
  3. Offline

    WolfMage1

    Tried that as well with no success.

    Also tried using spawnEntity instead but there's still no armor stand.

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 2, 2016
  4. Offline

    WolfMage1

  5. @WolfMage1
    The thing is, you don't have to do it in this roundabout way. Just set the "CustomNameVisible" NBT tag on the entity and you should be good to go.
     
Thread Status:
Not open for further replies.

Share This Page