Open SlimeDog opened 1 year ago
I will do that in the comming days and keep you updated here.
The most important API access points are hologram name (ie., the list) and visibility. pHD
utilizes a variety of factors to determine if a hologram should be visible to a particular player, so it needs to be able to set/unset visibility.
To get a hologram by name:
Hologram holo = FancyHolograms.getInstance().getHologramManager().getHologram("name");
To get a list of all holograms:
Collection<Hologram> holograms = FancyHolograms.getInstance().getHologramManager().getAllHolograms();
To show/spawn to a player
hologram.spawn(serverPlayer); // requires a ServerPlayer
HologramSpigotAdapter.fromHologram(hologram).spawn(player); // requires a normal Bukkit Player
To hide/remove to a player
hologram.remove(serverPlayer);
HologramSpigotAdapter.fromHologram(hologram).remove(player); // requires a normal Bukkit Player
There is no information stored which players see which holograms, but I'll make a HologramSpawnEvent and a HologramRemoveEvent, then you can in theory easily track that.
There is no information stored which players see which holograms, but I'll make a HologramSpawnEvent and a HologramRemoveEvent, then you can in theory easily track that.
pHD
controls visibility for a player, based on these factors.
@SlimeDog do you need any more information or can this be closed?
Has FancyHolograms API covered all the listed items?
We're also waiting for more hologram features, like heads and items and blocks, but those are in addition to the pHD
control features.
Would it be possible to adjust the build settings to include the API as a compile, or to combine the API project and the plugin project together?
The developer gradle repo is only allowing me to see the classes inside of the plugin branch; I can do FancyHologramsPlugin.get().getHologramsManager()
But I cannot see any of the events, the Hologram class, nor the HologramData class. As a result, I really can't use the API if I am not just manually adding the API package into my project.
The above image should have shown me a list of possible methods and fields inside the Hologram class, but as it cannot be found, it is blank.
Would it be possible to adjust the build settings to include the API as a compile, or to combine the API project and the plugin project together?
The developer gradle repo is only allowing me to see the classes inside of the plugin branch; I can do
FancyHologramsPlugin.get().getHologramsManager()
But I cannot see any of the events, the Hologram class, nor the HologramData class. As a result, I really can't use the API if I am not just manually adding the API package into my project.The above image should have shown me a list of possible methods and fields inside the Hologram class, but as it cannot be found, it is blank.
Yes I'll see what I can do (I'm not the best with maven repos and gradle), thank you for telling
We're also waiting for more hologram features, like heads and items and blocks, but those are in addition to the
pHD
control features.
I just released the feature to have item & block holograms (https://github.com/FancyMcPlugins/FancyHolograms/releases/tag/v2.0.3)
Do you need anything else?
Do you need anything else?
I will test it over the next week or so. Thanks.
Do you need anything else?
Command(s) to convert from HolographicDisplays and DecentHolograms would be a big plus.
OK, I've done some testing (more to follow).
In what follows, HD=HolographicDisplays, DH=DecentHolograms, FH=FancyHolograms.
A hologram should be a collection of (one or more) related display entities of various types. For me, a typical hologram consists of a block in the middle (vertically) of several text lines.
I would like to add FancyHolograms support to pHD. It would be helpful if the issues noted above
could be addressed. Thanks for your consideration.
I would like to add FancyHolograms support to pHD. It would be helpful if the issues noted above
* combined holographic elements in a single hologram * bouncing/rotating block elements * centered location specification
could be addressed. Thanks for your consideration.
Combined hologram elements in one single holograms is not planned for now. You would need to position multiple holograms by yourself.
I'll think about bouncing & rotating item/block holograms. That could be pretty cool.
You can center the hologram on block with the moveTo command (x.5 y z.5
)?
You can center the hologram on block with the moveTo command (x.5 y z.5)?
Yep. Works great. Thanks.
I'll think about bouncing & rotating item/block holograms. That could be pretty cool.
That would be great.
Combined hologram elements in one single holograms is not planned for now. You would need to position multiple holograms by yourself.
OK. Will do.
Please implement a public API so pHD can consider adding support.