frengor / UltimateAdvancementAPI

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

Kyori components for text formatting #77

Open CrazyDev05 opened 8 months ago

CrazyDev05 commented 8 months 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 8 months ago

Hello, is this sufficient to support your requests?

CrazyDev05 commented 8 months ago

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

CrazyDev05 commented 8 months 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 8 months 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 8 months ago

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

CrazyDev05 commented 8 months ago

opened a PR that does that: #78

frengor commented 8 months 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 8 months ago

This is being discussed on discord.