▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/PrismaticAPI
PrismaticAPI

PrismaticAPI

Versatile library for advanced color manipulation and text formatting in Bukkit/Spigot/Paper plugins.

Оцените первым
281
1
Все версииUpdate 2.0.0

Update 2.0.0

Release04.08.2026

Список изменений

The Element API

Major rewrite of the interactive message system. Element replaces the old chat components with a single immutable type that is parsed once and rendered per player, plus a faster color pipeline. Classic PrismaticAPI.colorize(...) usage is untouched.

Added

  • Added Element, one message type for plain text and interactive text. Parse it once, keep the instance, and render it for every player.
  • Added placeholder support inside elements: {name} and %name% tokens are kept as data and resolved at render time, so a gradient now spans the resolved value instead of the length of the token.
  • Added a render cache. Each segment caches its colorized text for the two color profiles (hex and legacy), so an element sent to a hundred players pays the color pipeline twice.
  • Added AdventureElement as a separate class, so a server without Adventure never loads a Kyori class by touching an element.
  • Added PrismaticAPI.supportsHexColors(player) to check whether a player's client can actually receive RGB colors.
  • Added PrismaticAPI.forgetPlayer(...) and PrismaticAPI.clearPlayerCache() to drop cached player color capabilities.
  • Added markup helpers: Element.isMarkup(raw), Element.stripMarkup(raw), element.toMarkup(), and autoLinkUrl() on the builder.

Changed

  • Replaced the me.croabeast.prismatic.chat package with me.croabeast.prismatic.element. ChatComponent and MultiComponent are gone; Element covers both.
  • Elements are now immutable. Changes go through element.toBuilder(), so a shared instance can never be modified by another consumer.
  • Renamed three click constants: EXECUTE to RUN_COMMAND, SUGGEST to SUGGEST_COMMAND, CLIPBOARD to COPY_TO_CLIPBOARD. The string aliases (run, suggest, copy, ...) are unchanged.
  • A player's hex support is now resolved once per session instead of once per formatted line.
  • Text with no color markers now skips the color passes entirely.
  • An empty message now renders to an empty array instead of a padded blank component.
  • Updated the Gradle wrapper to 9.6.1.

Fixed

  • Fixed gradients bleeding one color too far when the text started with a hex-prefixed color.
  • Fixed placeholders not resolving inside click and hover values of an element.

Notes / Recommendations

  • This is a breaking release. Any plugin using the old chat components must be updated before it will compile against 2.0.0.
  • The README includes a full migration table from 1.5.x to 2.0.0, method by method.
  • Call PrismaticAPI.forgetPlayer(...) from your PlayerQuitEvent handler so cached entries do not survive the session.
  • Plugins that only use PrismaticAPI.colorize(...) and the Adventure facade need no changes.

Файлы

PrismaticAPI-2.0.0.jar(102.32 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

2.0.0

Загрузчики

Bukkit
Folia
Paper
Purpur
Spigot

Версии игры

1.8–26.2

Загрузок

22

Дата публикации

04.08.2026

Загрузил

ID версии

Главная