Holographic Displays

Holographic Displays

3M Downloads

(HologramAPI) getName() doesn't exist?

wallysaurus opened this issue ยท 1 comments

commented

Description

I'm fairly new to the HologramAPI, so it was very surprising that there was no way to get a hologram by its name. This seems like a pretty necessary feature to have, so here's my suggestion. (Side Note, yes, I did look on the API website beforehand. If such a thing does exist, forgive me.)

How it would work:

            for (Hologram holo : getHolograms(Main.get())) {
                if (holo.getName().equals("HologramName")) {
                    Hologram selectedHolo = holo;
                }
            }```
commented

When you create a hologram, the method returns the created hologram. Create an object wrapping it and give it a name, then store it in a collection.