Solved Name above block

Discussion in 'Spigot Plugin Development' started by Vhbob, Jun 30, 2018.

  1. Hello, title says it all. I want to have a title above a block.
     
  2. Spawn an invisible entity (like an armorstand) and set its name visible. Blocks cannot have names, only entities.
     
  3. I have created the armorstand and set its name and all of that, however, it moves around and i don't see a set invisible option.

    Edit: Tried swapping the type from entity to armor stand. Now works perfectly.
     
  4. Code (Java):
    armorStand.setVisible(false); // makes it invisible
    armorStand.setGravity(false); // wont fall with gravity
    armorStand.setMarker(true); // removes hitbox/cant be pushed
    armorStand.setSmall(true); // makes it small
    armorStand.setCustomName("Some Name"); // gives it a name
    armorStand.setCustomNameVisible(true); // makes the name visible