The armorstand.setCustomName() method basically sets the Entity's custom name in its DataWatcher object (found here at index 2). Then we create a new PacketPlayOutEntityMetadata with the appropriate parameters (the last parameter tells the packet constructor whether or not you want to resend all entity metadata or just metadata that is new) and then send it to the specified client.

And while I don't remember exactly, I think some versions are using different indexing (watcher objects.)

My personal recommendation would be to build your system on a packet adapter rather then firing a packet. You'll need to keep track of removed, created, teleported etc holograms (including when a player leaves the range/server.)

Setup a packet adapter for the metadata packet, resend it by simply setting the custom name to anything - intercept the packet and done.

The armorstand.setCustomName() method basically sets the Entity's custom name in its DataWatcher object (found here at index 2). Then we create a new PacketPlayOutEntityMetadata with the appropriate parameters (the last parameter tells the packet constructor whether or not you want to resend all entity metadata or just metadata that is new) and then send it to the specified client.

if this is for pre 1.13 just use "setCustomName" with a string object for EntityArmorStand.
if this is for 1.13, you need to invoke setCustomName with IChatBaseComponent as an argument. You can instantiate IChatBaseComponent object using IChatBaseComponent.ChatSerializer.b(String) method.

if this is for pre 1.13 just use "setCustomName" with a string object for EntityArmorStand.
if this is for 1.13, you need to invoke setCustomName with IChatBaseComponent as an argument. You can instantiate IChatBaseComponent object using IChatBaseComponent.ChatSerializer.b(String) method.