Solved Invisible armorstand

Discussion in 'Spigot Plugin Development' started by TheSupreme, Apr 19, 2017.

  1. Debugged with console messages, the entity location is correct. The armorstand is created correctly, however I cannot see it, period. o_O

    Code (Text):
    public void spawnEntity()
        {
            armorstand = (ArmorStand) world.spawnEntity(location, EntityType.ARMOR_STAND);
            armorstand.setHealth(getHealth());
            armorstand.setGravity(false);
            armorstand.setCustomName("§e§l" + getName() + " §cHealth: " + getHealth() + "/" + getMaxHealth());
            armorstand.setCustomNameVisible(true);
        }
     
  2. BananaPuncher714

    Supporter

    Did you try ArmorStand#isVisible() and ArmorStand.setVisible()?
     
  3. Yes, I tried both. Armorstand isn't showing up. I'm not exactly sure that it is invisible.
     
  4. FrostedSnowman

    Resource Staff

    is the world correct?

    try teleporting to the armorstand's location after spawning it.

    make sure the spawning of it isn't being blocked
     
  5. This is resolved. Thanks.

    I had my math wrong for the location.