frengor / UltimateAdvancementAPI

A powerful API to create custom advancements for your Minecraft server.
https://modrinth.com/plugin/ultimateadvancementapi
GNU General Public License v3.0
79 stars 6 forks source link

Kyori components for text formatting #77

Open CrazyDev05 opened 1 week ago

CrazyDev05 commented 1 week ago

Please add support for the kyori adventure api for easier formatting of texts if this isn't fully possible, at least make it so i can input a json formatted component

EscanorTargaryen commented 1 week ago

Hello, is this sufficient to support your requests?

CrazyDev05 commented 1 week ago

think so, thx for the quick answer didn't see that entry

CrazyDev05 commented 1 week ago

is it possible to use that in the advancement displays, as i don't see a way to access it or do i need to extent the AdvancementDisplay class?

CrazyDev05 commented 1 week ago

Hello, is this sufficient to support your requests?

Hey I'm currently checking and i don't think it is, as i would like to format the title and description with translatable component which as far as i can see isn't possible rn

CrazyDev05 commented 1 week ago

my proposal would be to use CraftChatMessage.fromJSONOrString(message, nullable keepNewlines); instead of CraftChatMessage.fromStringOrNull(message, keepNewlines);

CrazyDev05 commented 1 week ago

opened a PR that does that: #78

frengor commented 1 week ago

Currently we do not support special components like translatable components (except in getAnnounceMessage, since it returns a BaseComponent). They will be supported in the upcoming 3.0.0 version since displays will use BaseComponents.

frengor commented 5 days ago

This is being discussed on discord.