Danger

The Adventure docs are currently a work in progress and supplement the Javadocs. Some areas may have limited coverage or may not be entirely up to date. Feel free to join our Discord if you have any questions.

adventure#

v4.11.0: 🌏 Adventure 4.11.0#

Released on 2022-06-02 - GitHub

4.11.0 is a small feature release bundling up a variety of tweaks from the past few months. It does not incorporate any of the new API for 1.19 features -- that is slated for 4.12.0, scheduled for release shortly after Mojang releases Minecraft 1.19.

Additions

Fixes 🐛

  • fix negative number parsing for positions by @Machine-Maker in #733
  • MiniMessage: Handle arguments for PreProcessTags correctly by @JOO200 in #735
  • fix: Fixed TagResolvers equality by @4drian3d in #751
  • text-minimessage: Validate tag names in resolver builder by @zml2008 in #771

New Contributors

Full Changelog: v4.10.0...v4.11.0

v4.10.1: 🌏 Adventure 4.10.1#

Released on 2022-03-07 - GitHub

This is a minor bugfix release of Adventure to resolve some issues with MiniMessage tag filtering.

As a small programming note for those of you who test our snapshots, we will be moving from the (moderately overloaded) oss.sonatype.org to the newer s01.oss.sonatype.org for our snapshot repository in the near future. An announcement will be posted on Discord when this migration is complete, and the documentation will be updated.

Fixes 🐛

  • #723 - minimessage: Ignore invalid tags when parsing
  • #727 - minimessage: Add stacktraces and more details to legacy errors

v4.10.0: 🌏 Adventure 4.10.0#

Released on 2022-02-28 - GitHub

Adventure 4.10.0 is a feature release of Adventure, providing (at long last!) a stable release of the MiniMessage serialization format, as well as a variety of quality-of-life improvements.

To get started with MiniMessage, take a look at its documentation: https://docs.adventure.kyori.net/minimessage/, and try it out with the Web UI!

Thanks to everyone who contributed to making this release happen -- it's been a long time coming!

Additions

  • #622 - Merge minimessage
  • #490 - api: add TextDecoration#withState and add missing null pointer check
  • #449 - api: Rename Title.Times.of
  • #444 - Add decorations(Map) to component/style builders
  • #472 - Add TriState toBoolean helper methods
  • #480 - extra-kotlin: Added more extensions and enabled explicit API
  • #495 - Add Tristate method to TextDecoration.State
  • #482 - Add standard join configurations
  • #479 - extra-kotlin: Add some JoinConfiguration related methods
  • #501 - Abstract out style methods to StyleWriter/Reader
  • #645 - feat(key): expose a Comparator for Key
  • #617 - api: Introduce Component.textOfChildren as a replacement for TextComponent.ofChildren
  • #652 - chore: Rename some static constructer methods
  • #650 - feat(api): Internal configuration
  • #698 - New builder
  • #700 - key: make Key extend Namespaced
  • #488 - Component::applyFallbackStyle helper method
  • #717 - text-minimessage: Limit characters allowed in tag names

MiniMessage changes since 4.2.0-SNAPSHOT

Because MiniMessage had a fairly extended development process, there have been several notable changes (some breaking) since earlier development phases that may affect any testers of the older API.

This is just a summary -- see the documentation for a full overview of the latest API.

  • #635 - text-minimessage: Properly handle colour override depth reductions
  • #663 - chore: Remove parse method
  • #657 - Introduce a method by which to create raw replacements
  • #671 - text-minimessage: Use a Consumer rather than Appendable for debug output
  • #672 - minimessage: Unify transformations and placeholders
  • #658 - text-minimessage: add deserialization method returning parsed tree
  • #681 - fix: Require all input to be non-null
  • #682 - minimessage: Add a reset tag via a parser directive
  • #687 - Add a new tag for line breaks (<br>)
  • #701 - Allow parsing with custom Tag Resolvers
  • #703 - Rework the MiniMessage serializer to consolidate behavior into resolvers
  • #708 - text-minimessage: Expose the root node type to API
  • #707 - text-minimessage: Allow tags to be closed in one tag
  • #662 - Warn when input contains legacy formatting codes (#515)
  • #674 - Implement TransitionTag

Fixes 🐛

  • #485 - Add more non-null value validations
  • #451 - api: Add inVersion to all @ApiStatus.ScheduledForRemoval annotations
  • #493 - Fix accidental float and double NaN parsing
  • #497 - Fix premature SNBT parsing as number
  • #498 - Fix unquoted string being parsed as double
  • #500 - Fix return type on #decorate method in ScopedComponent
  • #481 - fix #447 by allowing deserializeOr to return null
  • #633 - api: Resolve duplication of children when performing text replacement
  • #641 - api: Use initial style when replacement-rendering a hover event
  • #647 - util: Add a range check for HSVLike

Minor changes

  • Bump JetBrains annotations to 23.0.0
  • serializer-configurate4: Bump Configurate dependency to 4.1.2
  • #474 - Clarify Audience#filterAudience(Predicate) docs
  • #642 - Add tests for Title and Title.Times
  • #660 - chore: 2022

Full Changelog: v4.9.1...v4.10.0

v4.9.3: 🌏 Adventure 4.9.3#

Released on 2021-10-31 - GitHub

This is a small backport of some further issues discovered in the development process of 4.10.0

Fixes 🐛

  • #475 - Fix text decoration parsing
  • #477 - Fix titles on 1.8
  • #487 - Fix compaction joining text components with children

v4.9.2: 🌏 Adventure 4.9.2#

Released on 2021-10-04 - GitHub

This is a small backport of some issues discovered in the development process of 4.10.0

Fixes 🐛

  • #463 - fix #455 (Component compacting sometimes uses the wrong colour)
  • #460 - nbt: Fix reading of explicit int array entries
  • #452 - nbt: Fix reading of trailing comma in nbt list/array/compound
  • a92511c - text-serializer-legacy: Properly copy over flattener when calling toBuilder

v4.9.1: 🌏 Adventure 4.9.1#

Released on 2021-09-07 - GitHub

Fixes 🐛

  • #439 - api: Be more strict about validating nullness of appended components
  • #440 - api: Don't have redundant overrides of Pointered methods
  • eb867ff - text-serializer-gson: Remove use of recently added Gson method
  • ce69e32 - api: Correct nullabiilty on Pointered.getOrDefault

v4.9.0: 🌏 Adventure 4.9.0#

Released on 2021-09-05 - GitHub

Adventure 4.9.0 is a feature release of Adventure, providing new API, some nice performance improvements for the GSON serializer, and a few bug fixes.

Additions

  • #365 - api: Audience#forEachAudience and Audience#filterAudience
  • #339 - api: Component iterator
  • #344 - api: Advanced Component joining
  • #373 - text-serializer-gson: Migrate remaining serializers to use TypeAdapters
  • #406 - api: Add TitlePart
  • #426 - api: Add Locale pointer
  • #404 - api: Add Keybind interface
  • #308 - api: Add support for 'compacting` components

Fixes 🐛

  • #430 - fix: Check for null supplier
  • #421 - api: Merge style of full match when replaced
  • #407 - api: Make sure pointers()is overridden in ForwardingAudience.Single

Dependency updates

  • Bump examination from 1.1.0 to 1.3.0
  • Bump JetBrains annotations to 22.0.0
  • serializer-configurate3: Bump Configurate dependency to 3.7.2
  • serializer-configurate4: Bump Configurate dependency to 4.1.1

v4.8.1: 🌏 Adventure 4.8.1#

Released on 2021-06-12 - GitHub

Fixes 🐛

  • ad71410 - api: Don't fail when a decoration state is set
  • #403 - Link between submodules in the published Javadoc

v4.8.0: 🌏 Adventure 4.8.0#

Released on 2021-06-07 - GitHub

Additions

  • #334 - api: Add support for new separator field in Minecraft 1.17
  • #390 - Migrate from checker-qual to JetBrains annotations
  • #328 - api: add Sound.Source.Provider interface
  • #332 - api: Allow passing the replacement MatchResult to continuation predicates
  • #327 - api: Expose ComponentLike -> Component conversion method
  • #371 - key: Improve key method javadocs
  • #352 - api: Add the ability to query an Audience for a value based on a Pointer key
  • #393 - api: Add Pointer query to Single
  • #361 - api: Add Translatable interface
  • #343 - api: Allow platforms to apply implementation hooks when creating ComponentSerializers
  • #379 - api: Add ability to unset decorations during component construction
  • #329 - api: Allow stopping a sound using the original Sound
  • #316 - api: Add support for playing sound following an "emitter"
  • #215 - api: Add TextColor.lerp to blend between two colours

Fixes 🐛

  • #333 - text-serializer-legacy: Properly passthrough invalid RGB codes
  • #355 - api: Fix typo in deserializeOrNull
  • #364 - api: Add contains method that allows alternative methods of equality comparison
  • #389 - api: NamedTextColor examinable properties should include name

v4.7.0: 🌏 Adventure 4.7.0#

Released on 2021-03-09 - GitHub

Deprecations 🧓

  • #301 - api: Mark ScoreComponent's value as deprecated since it is no longer supported as of 1.16
  • #307 - api: Deprecate Component#detectCycle (#285)

Additions

  • #259 - api: Add contains method to translation registries
  • #296 - serializer-gson: Add deserializer for JsonElement
  • #305 - api: Add serializer methods that can process null values (#221)
  • #298 - serializer-gson: Add serializer to JsonElement
  • #300 - api: Nag when somebody does something naughty
  • #306 - build: Add extra metadata to jar manifests (#290)
  • #302 - api: Introduce new concept of a component flattener

Fixes 🐛

  • #297 - bom: fix missed text-serializer-gson-legacy-impl
  • #299 - text-serializer-legacy: Tweak reset behavior again
  • #304 - Fixed typo in documentation in Title

v4.6.0: 🌏 Adventure 4.6.0#

Released on 2021-03-02 - GitHub

Additions

  • #273 - feature(nbt): allow merging compound tags via this.put(that)
  • #280 - api: Add asHSV to RGBLike and use HSV for color comparisons in NamedTextColor.nearestTo
  • #283 - extra-kotlin
  • #284 - Added ZLIB compression support for NBT
  • #288 - api: Add Keyed overloads to hover event types
  • #289 - api: Add a method to create a TextColor from an HSVLike
  • #292 - api: Add methods to join components using a collector
  • #294 - build: Update examination to 1.1.0
  • #283 - extra-kotlin
  • #231 - Customize debugger output

Fixes 🐛

  • #291 - text-serializer-legacy: Don't insert redundant resets

v4.5.1: 🌏 Adventure 4.5.1#

Released on 2021-02-23 - GitHub

Fixes 🐛

  • #266 - text-serializer-legacy: StringIndexOutOfBoundsException when parsing malformed hex colors
  • #277 - api: TextColor.color(int) / NamedTextColor.ofExact(int) don't ignore the alpha channel

v4.5.0: 🌏 Adventure 4.5.0#

Released on 2021-02-10 - GitHub

Fixes 🐛

  • #278 - nbt: return the empty list tag when trying to create a listtag with an empty list of tags

v4.4.0: 🌏 Adventure 4.4.0#

Released on 2021-01-18 - GitHub

Additions

  • #228 - Add JetBrains @Contract annotation to some methods
  • #240 - nbt: Add the ability to add multiple tags to a CompoundBinaryTag
  • #241 - nbt: Add BinaryTagLike interface
  • dccfc46 - nbt: Implement toString in binary tags
  • #247 - nbt: Add getList methods to ListBinaryTag
  • #248 - nbt: Add from(Iterable) and add(Iterable) methods to ListBinaryTag
  • #229 - api: Expand javadocs (thanks @KingOfSquares)

Fixes 🐛

  • #233 - api: Correct handling of children in some text replacements
  • #252 - Do not exclude Component#empty from the children of TranslatableComponent
  • #257 - serializer-gson: Change output ordering to match the order of Vanilla components
  • nbt: Resolve a security vulnerability that could lead to denial of service when loading specially crafted input

Changes 🔧

  • 50482cf nbt: Deprecate usage of listType in ListBinaryTag, introduce elementType instead
  • 0a62bb1 - api: Sound.Type extends Keyed

v4.3.0: 🌏 Adventure 4.3.0#

Released on 2020-12-04 - GitHub

Additions

  • #217 - text-serializer-gson-legacy-impl
  • 60b2c93 - api: add ComponentLike methods to BossBar
  • #219 - api: Player list header/footer support

v4.2.0: 🌏 Adventure 4.2.0#

Released on 2020-11-25 - GitHub

Additions

  • #183 - Introduce support for Configurate 4
  • #190 - nbt: Add array access and stream methods for tags
  • #200 - api: Add a builder for replacement config
  • #211 - Add a BOM for version alignment across submodules

Fixes 🐛

  • #193 - Ignore null values for HoverEvent NBT tag when deserialising using text-serializer-gson
  • #196 - Properly reset decorations when serialising to legacy format
  • #199 - api: Fix handling of first replacements in child components
  • #213 - @NonNull contract not being followed when using GsonComponentSerializerto deserilise "null"

Changes 🔧

  • Deprecate usage of percent in BossBar, introduce progress instead
  • Deprecate old replaceText methods in favour of replaceText methods that use TextReplacementConfig

v4.1.1: 🌏 Adventure 4.1.1#

Released on 2020-10-17 - GitHub

🐛 The fixes

v4.1.0: 🌏 Adventure 4.1.0#

Released on 2020-10-16 - GitHub

🍰 The additions

  • sendMessage methods have been added to Audience that use the Identity.nil() identity by default - please make sure you are using the correct methods when sending messages

v4.0.1: 🌏 Adventure 4.0.1#

Released on 2020-10-16 - GitHub

🐛 The fixes

v4.0.0: 🌏 Adventure 4.0.0#

Released on 2020-10-14 - GitHub

Adventure 4.0.0 is a leap forward for the library previously known as Text. Adventure is a cross-platform library that is designed to simplify using Minecraft: Java Edition user-interface elements across all the major platforms. It also adds support for the latest Minecraft: Java Edition version features to ensure you can develop the best adventures your plugin or server possibly can!

The shiny new things ❇️

  • Documentation, available at https://docs.adventure.kyori.net/
  • a new Audience framework
    • entry point for displaying/sending content (messages, boss bars, titles, sounds) to viewers, such as a player or the server console
    • a standard interface for platforms to implement, useful for cross-platform development
  • ability to create and display a BossBar
  • ability to create and display a Title
  • ability to play a Sound
  • ability to use the Translator framework for using custom "server-side translations" in any Component-based content

The refactors 🔧

  • The package has moved from net.kyori.text to net.kyori.adventure.text
  • of and builder methods in Component interfaces have moved to the Component interface - for example:
    • TextComponent.of("foo") becomes Component.text("foo")
    • TextComponent.builder().content("foo") becomes Component.text().content("foo")
  • RGB colour support via TextColor
  • changes to HoverEvent required to support Minecraft 1.16

Platform support 🗼