-
Notifications
You must be signed in to change notification settings - Fork 151
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
MiniMessage format support #743
Comments
There was a bit of discussion on Discord about this particular issue a while back, and I just want to make a quick note here for the sake of completeness. As per the maintainability goals of the project, we can't add support for something that isn't natively supported in the Bukkit API. The only feasible solution at this point in time is a rework of the message system that allows for extension plugins to bridge the gap similar to how MobArenaStats, MobArenaPlaceholders, and Sait's extension have done for their areas of responsibility. This is a fairly simple task, really, but it will take a significant amount of time. The arguably best solution would be to swap to the Paper API for native support, but this would cut off 35 % of the servers running MobArena. As long as the Paper API remains a true superset of the Spigot API and such a large portion of servers aren't running Paper, Spigot's Bukkit API is the most accommodating. I don't see flexible text formatting as a strong enough reason to significantly reduce maintainability, especially considering much more pressing matters pertaining to the actual "mob" and "arena" aspects of the plugin. |
Perhaps the future hard-fork of Paper or the upcoming paper-plugin feature would be a solution? Later one would essentially allow you to define a separate main class where you could then use paper-exclusive stuff when the plugin runs on said paper server, with spigot being present as a fallback. Also, how is MobArena working in terms of versions? Like what versions is the latest release used on? Do you have stats on that? I feel like those would be some of the more elegant solutions here to have. |
Also, for the sake of clarification, regarding the aforementioned paper plugin stuff I mean this here: PaperMC/Paper#8108 Latest comment says it's planned to be published this weekend (Unless something happens I guess), so it could be an idea to look into this stuff honestly... And as mentioned would it fall back to be treated as Spigot plugin, so the existing code would still work for older versions without issues. |
If a Paper hard fork results in the community as a whole shifting to Paper as the "mother project", chances are plugin developers will follow suit and slowly drop support for Spigot's Bukkit API. In that case, it would be natural for MobArena to tag along. In the worst case, we'll need a multi-module project to keep supporting both platforms. That would suck. Thanks for the But yeah, interesting stuff. Exciting to see what comes out of it. |
Feature request
Short description
It would be a nice addition to have support for the MiniMessage text format in MobArena. That way could people also define more complicated things such as hover text for specific text areas or maybe even click actions.
I could f.e. imagine MobArena sending an announcement that an arena may start soon and thanks to that format could the text contain a click action to join the arena itself.
Implementation details
Personally, I would go with using MiniMessage while dropping the legacy colour code one. This one, especially for stuff like HEX colours is horrible and not a good option to utilize.
Not to mention do Spigot forks such as PaperMC natively support the Adventure library and MiniMessage through their sendMessage methods.
This of course would have conflicts with normal spigot servers which could be fixed by having separate versions of MobArena (A multi-module project) for Spigot and PaperMC respectively... Tho this too would come with work and some complications in other areas...
The easiest solution could probably be to shade in the libraries and use them accordingly. Perhaps make dedicated classes for sending stuff on Spigot and PaperMC.
Additional info
MiniMessage is getting more and more popular amongst people (And not just devs), especially since it allows more special things like the aforementioned hover text and click action with a simple Syntaxt that doesn't require the dev to have a complicated parsing mechanic implemented.
It would certainly help people to make nice looking text with stuff such as Gradients.
The text was updated successfully, but these errors were encountered: