adventureΒΆ
v4.17.0: π Adventure 4.17.0ΒΆ
Released on 2024-05-08 - GitHub
What's Changed
β¨ Features
- feat(text-minimessage): Show ANSI rendering of parsed components in tests by @zml2008 in #1042
- feat(minimessage): Add target to deserialization for contextual tags by @kezz in #1051
- feat(api): Pointers supplier by @kezz in #429
- 1.20.5 by @zml2008 in #1055
π Fixes
- fix(text-minimessage): Handle larger raninbow phases correctly by @zml2008 in #1041
- fix: Allow for case-insensitivity in legacy serializer, closes #1043 by @kezz in #1044
- fix(api): Only trigger bossbar listeners if flags actually changed by @zml2008 in #1067
- fix(nbt):
CompoundBinaryTag#getBoolean
ignores false values when default value is true by @kashike in e0edf0f - fix(nbt):
ListBinaryTag
is weakly immutable by @kashike in 2e612aa
Full Changelog: v4.16.0...v4.17.0
v4.16.0: π Adventure 4.16.0ΒΆ
Released on 2024-02-20 - GitHub
Adventure 4.16.0 is a small feature release following up on the additions in 4.15.0.
Notable Changes
As Configurate 3 is more or less obsolete and seeing reduced usage, we've decided to stop distributing it with new versions of Adventure. The Configurate 4 serializers should be used instead, or for those who cannot migrate yet an older version of the adventure-serializer-configurate3
module can be used instead.
β¨ Features
- feat(serializer-configurate3): remove it by @zml2008 in #1016
- add component decoder by @yannicklamprecht in #1035
- feat(api): Add removeResourcePack overload with Iterable by @zml2008 in #1036
- kissing girls by @aurorasmiles and @weaondara and @Chew
π Fixes
π Documentation
New Contributors
- @yannicklamprecht made their first contribution in #1035
Full Changelog: v4.15.0...v4.16.0
v4.15.0: π Adventure 4.15.0ΒΆ
Released on 2023-12-18 - GitHub
Adventure 4.15.0 is a feature release, primarily focused around adding support for new serialization styles used in Minecraft 1.20.3, but containing some other useful changes.
The support for 1.20.3 in this release is at about a bare-minimum level of what's needed to support reading components generated in the newer version. Further parity features have been targeted for 4.16.0.
β¨ Features
- feat(api): hasAnyTranslations by @kashike in #945
- feature: Add a new standard join configuration for spaces by @RedDaedalus in #962
- feat(nbt): expose size in CompoundBinaryTag by @RealBauHD in #965
- feature: Expose tags and strict mode in
MiniMessage
by @kezz in #951 - feat(key): add asMinimalString by @kashike in #983
- feat(api): Identity implements Identified by @kashike in #985
- feat(api): introduce ResourcePackRequest by @yusshu in #981
- feature: Cancellable FlattenerListener by @FxMorin in #996
- feat(api): Expand the supported resource pack operations for 1.20.3 by @zml2008 in #1005
- feat(api): Support representing translation args losslessly by @zml2008 in #1004
- feat(nbt): Implement nameless binary serialization by @booky10 in #968
- 1.20.3 by @zml2008 in #986
- feat(api): A feature flag system to handle version compatibility by @zml2008 in #1002
π Fixes
- fix(api): Flatten ScoreComponent to empty string if score value is null by @Konicai in #954
- Fix StorageNBTComponentTest by @jpenilla in #1007
π Documentation
- Fix JavaDoc error by @CheeseTastisch in #980
Other
- Use EqualsTester instead of weird equality assertion by @KingOfSquares in #989
New Contributors
- @Konicai made their first contribution in #954
- @RedDaedalus made their first contribution in #962
- @RealBauHD made their first contribution in #965
- @CheeseTastisch made their first contribution in #980
- @yusshu made their first contribution in #981
- @FxMorin made their first contribution in #996
- @booky10 made their first contribution in #968
Full Changelog: v4.14.0...v4.15.0
v4.14.0: π Adventure 4.14.0ΒΆ
Released on 2023-06-07 - GitHub
Adventure 4.14.0 is a feature release introducing some long-awaited API additions, primarily focused on component serializers.
β¨ Features
- ComponentEncoder by @rymiel in #899
- feat(api): introduce a way to get viewers of a bossbar by @kashike in #894
- feat: allow custom colors in LegacyComponentSerializer by @Camotoy in #906
- ANSIComponentSerializer by @rymiel in #898
- feat(key): try to include additional information in error messages when an invalid character has been detected in a Key by @kashike in #887
- chore: rename static constructors by @powercasgamer in #923
- feat: add pattern annotations by @powercasgamer in #920
- feat: add join method that accepts JoinConfiguration.Builder by @powercasgamer in #924
- Use constants for hex character by @kashike in #929
- Added legacy show achievements by @LOOHP in #890
- feature: json component serializer by @kezz in #856
π§ Changes
As a small programming note, the changes necessary to introduce the text-serializer-json
abstraction have shifted things around in the Adventure module dependency graph. adventure-text-serializer-gson
now depends on adventure-text-serializer-json
. Additionally, adventure-text-serializer-gson-legacyimpl
now depends on adventure-text-serializer-json-legacyimpl
, and is entirely deprecated, to be replaced with the json
version. In 4.15.0, we will no longer ship the deprecated submodule -- any users who need it can continue to depend on the older version. To facilitate this change, adventure-text-serializer-gson-legacyimpl
has been removed from the bom to avoid improperly forcing version alignment.
π Fixes
- fix: Added missing PermissionChecker nullability checks by @4drian3d in #900
- fix(key): fix combined namespace+value pattern + extract to own annotations by @kashike in #925
New Contributors
- @powercasgamer made their first contribution in #923
- @LOOHP made their first contribution in #890
Full Changelog: v4.13.1...v4.14.0
v4.13.1: π Adventure 4.13.1ΒΆ
Released on 2023-04-09 - GitHub
Adventure 4.13.1 is a bugfix release with fixes focused around MiniMessage and translatable component fallbacks. We recommend updating at your earliest convenience.
Fixes π
- fix some issues with translatable component fallback by @LemonCaramel in #885
- ComponentFlattenerImpl: translatable components check fallback first by @Camotoy in #895
- fix(text-minimessage): Correctly handle phase and multi-colour gradients by @zml2008 in #896
New Contributors
- @LemonCaramel made their first contribution in #885
- @Camotoy made their first contribution in #895
Full Changelog: v4.13.0...v4.13.1
v4.13.0: π Adventure 4.13.0ΒΆ
Released on 2023-03-14 - GitHub
Adventure 4.13.0 is a feature release with several QOL enhancements, support for new 1.19.4 chat component features, and some bug fixes. Happy developing!
Additions β¨
- Finish adding MM tags for all Vanilla component types by @zml2008 in #843
- text-minimessage: Add a shortcut for styling tags by @Joo200 in #858
- text-minimessage: Add a TagResolver for boolean values by @Joo200 in #857
- feat(api): allow Translators to create their own Components by @qixils in #871
- feat(api): Add emulated callback click event by @zml2008 in #860
- feat(api): add support for translatable component fallbacks (#863) by @NoahvdAa in #868
Fixes π
- bug(api): workaround which fixes #849 by @kashike in #861
- Make DecorationMap$KeySet and $Values follow Collection::toArray() contract by @emilyy-dev in #862
- fix(serializer-gson): Ignore empty hover event values by @zml2008 in #859
- change minimessage rainbow tag colors by @MrKinau in #882
- bug(minimessage): respect requests to include stacktraces by @kashike in 42ea3df
New Contributors
Full Changelog: v4.12.0...v4.13.0
v4.12.0: π Adventure 4.12.0ΒΆ
Released on 2022-11-27 - GitHub
This release, at long last, adds API to help work with the 1.19(.x) chat and sound changes, including sending messages with the new chat type system.
Due to the strict lifecycle of message signing, implementing the full chat flow will be mostly left to platforms. The exposed signed message API is intended for use with out-of-band operations like signed commands.
Thank you for your patience!
Additions β¨
- feature: 1.19 chat changes by @kezz in #777
- Implement seed field on sound, and add a builder by @zml2008 in #770
- key: Make Key implement Keyed by @zml2008 in #779
- Promote decorationIfAbsent to StyleSetter and Public API by @KingOfSquares in #785
- Add convenience methods for appending a newline/space to a component by @KingOfSquares in #786
- feat(key): #773 Expose methods to check if a Key can be parsed by @kashike in #774
- api: Style#unmerge by @kashike in #793
Fixes π
- api: Remove use of terminally deprecated SecurityManager api by @zml2008 in #781
- api: Fix improper stripping of colors when compacting by @zml2008 in #782
- bug(#788): disable html escaping and use uppercase hex colour codes by @kashike in #789
- minimessage: Parsing corner cases with quotes by @rymiel in #819
- fix(text-minimessage): Don't strip style of text components in gradients by @zml2008 in #835
- fix(text-minimessage): Preserve non-text components in color changing tags by @zml2008 in #834
- fix(text-minimessage): Be more lenient with input when stripping/escaping tags by @zml2008 in #833
- fix(text-minimessage): Properly handle escaped tag opens by @zml2008 in #832
- fix(api): Catch cases where empty components are not preserved by @zml2008 in #838
- bug(#792): don't throw on invalid click/hover event action by @kashike in 1c2463f
- bug(api): fix an issue when linearly building a component by @kashike in 7bb1875
Platform Changes π§
- Add PlatformAPI Annotation by @KingOfSquares in #778
- feat(api): bossbar platform implementation by @kashike in #836
Full Changelog: v4.11.0...v4.12.0
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 β¨
- Add orThrow and orDefault methods to Index by @Machine-Maker in #741
- feat(api): Add possibility of using Component#join with a root style by @KingOfSquares in #653
- Improve compaction of empty/blank TextComponents by @Moulberry in #764
- StyleImpl DRY (#392) by @emilyy-dev in #461
- text-minimessage: Add Placeholder to format Numbers and TemporalAccessors by @Joo200 in #709
- Implement MiniMessage preprocessor and cleanup parsing by @bluelhf in #749
- feat(minimessage): selector tag by @NoahvdAa in #737
- text-logger-slf4j: introduce wrapper for formatted logging by @zml2008 in #757
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
- @Machine-Maker made their first contribution in #733
- @4drian3d made their first contribution in #751
- @Moulberry made their first contribution in #764
- @bluelhf made their first contribution in #749
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 π
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 returnnull
- #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
andTitle.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 π
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 π
v4.9.1: π Adventure 4.9.1ΒΆ
Released on 2021-09-07 - GitHub
Fixes π
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
andAudience#filterAudience
- #339 - api: Component iterator
- #344 - api: Advanced
Component
joining - #373 - text-serializer-gson: Migrate remaining serializers to use
TypeAdapter
s - #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.2serializer-configurate4
: Bump Configurate dependency to 4.1.1
v4.8.1: π Adventure 4.8.1ΒΆ
Released on 2021-06-12 - GitHub
Fixes π
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
ComponentSerializer
s - #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 π
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 π
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
toRGBLike
and use HSV for color comparisons inNamedTextColor.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 π
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 toListBinaryTag
- #248 - nbt: Add
from(Iterable)
andadd(Iterable)
methods toListBinaryTag
- #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 π§
v4.3.0: π Adventure 4.3.0ΒΆ
Released on 2020-12-04 - GitHub
Additions β¨
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 forHoverEvent
NBT tag when deserialising usingtext-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 usingGsonComponentSerializer
to deserilise "null"
Changes π§
- Deprecate usage of
percent
inBossBar
, introduceprogress
instead - Deprecate old
replaceText
methods in favour ofreplaceText
methods that useTextReplacementConfig
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 toAudience
that use theIdentity.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 anyComponent
-based content
The refactors π§
- The package has moved from
net.kyori.text
tonet.kyori.adventure.text
of
andbuilder
methods inComponent
interfaces have moved to theComponent
interface - for example:TextComponent.of("foo")
becomesComponent.text("foo")
TextComponent.builder().content("foo")
becomesComponent.text().content("foo")
- RGB colour support via
TextColor
- The standard colours, previously in
TextColor
, can be found inNamedTextColor
- The standard colours, previously in
- changes to
HoverEvent
required to support Minecraft 1.16
Platform support πΌ
- Bukkit (and forks, such as Paper and Spigot) has a platform adapter available
- BungeeCord has a platform adapter available
- Fabric has a platform adapter available
- SpongeAPI 7.x has a platform adapter available
- SpongeAPI 8.x has native Adventure support - no platform adapter is required
- Velocity 1.1.x has native Adventure support - no platform adapter is required