-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adventure Component support #240
Comments
Just use the Legacy serializer of adventure to convert a component to a String with color codes. The main issue I see here is the fact that DH is not only for Paper but also for Spigot, while adventure is only used and supported by Paper and its forks. |
If the best solution is to simply use the legacy serializer, then perhaps the "Alternatives" section I listed in my issue could be implemented? i.e. a documentation page that informs people who use paper how to convert their text components to be usable by DHAPI? I would argue, however, that Adventure is included by default in many popular Minecraft APIs, and so we would still benefit from native support in DecentHolograms. |
The main issue with supporting adventure API natively in DecentHolograms is bloating the jar. As said is DecentHolograms not just designed for Paper servers alone, but also Spigot servers, which do not offer native Adventure Component support.
This would increase the jar file's size for just having a component system work in a specific server. Obviously, there is the argument of just using the library loader feature of Spigot to not shade in Adventure... We could now make a paper-plugin.yml to not have DH load as Spigot plugin, allowing us to not load the stuff on a Paper server, but this feature is fairly new (1.19.4+) and wouldn't work on previous versions. There would be the alternative of using a library such as Libby to do more dynamic library loading when needed... But this also has its flaws and problems to deal with. So yeah.... There is a lot to consider here with DH, especially if d0by wants to still support Spigot here, because 99% of these issues would be solved by simply only supporting Paper... But it's not my plugin, so I can't decide this. |
Just making sure
Problem
I am unable to achieve using Adventure API Components () in my hologram lines
I think it would be useful for compatibility with other plugins.
Most importantly, the Paper API deprecated
org.bukkit.ChatColor
in favor of Adventure API (source).Feature
I would like to see an overload method for
DHAPI.addHologramLine()
andDHAPI.setHologramLines()
withnet.kyori.adventure.text.Component
s as thecontent
parameter. Right now, they all make use ofString
. It would be nice if you could also optionally useComponent
objects.Alternatives
It would also be possible by providing a set of instructions for how to translate Adventure Components on the wiki to be usable as the lines in holograms.
The text was updated successfully, but these errors were encountered: