Please find a way to separate the Creation of an hologram from its Spawn
DavidTheExplorer opened this issue ยท 3 comments
Description
This is my first ever opened issue so I'm sorry if it will be a little bit long.
Today I ran into a difficulty when I used HologramsAPI::createHologram because it violates the Single Responsibility Principle(it both creates & spawns the hologram).
What happened: I have a class that gets an hologram in the constructor and spawns it after some time, it could have been very easy if createHologram did what its name suggested and only created the hologram object, instead I had to spend some time to build a wrapper in form of the Builder pattern for the Hologram and each line type - and change the constructor to take an instance of HologramBuilder so I can call its spawn() method in my desired time.
Please fix ๐
I'm sorry, as part of the switch to maintenance-only mode (read here for more info), I'm no longer adding new features or enhancements to the plugin.
Update: okay, it can be solved by using the visibility manager... but please still implement the separation.