Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Vhbob, Jun 30, 2018.
Hello, title says it all. I want to have a title above a block.
Spawn an invisible entity (like an armorstand) and set its name visible. Blocks cannot have names, only entities.
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.
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