java.lang.Object
net.minestom.server.adventure.MinestomAdventure
Adventure related constants, etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
If components should be automatically translated in outgoing packets.static BiFunction
<Component, Locale, Component> static final Codec
<net.kyori.adventure.nbt.CompoundBinaryTag, String, IOException, IOException> A codec to convert between strings and NBT. -
Method Summary
Modifier and TypeMethodDescriptionstatic Locale
Gets the default locale used to translate components when no overriding locale has been provided.static void
setDefaultLocale
(@Nullable Locale defaultLocale) Sets the default locale used to translate components when no overriding locale has been provided.static net.kyori.adventure.nbt.TagStringIO
Gets theTagStringIO
instance used to convert SNBT.static net.kyori.adventure.nbt.BinaryTag
unwrapNbt
(BinaryTagHolder holder) static BinaryTagHolder
wrapNbt
(net.kyori.adventure.nbt.BinaryTag nbt)
-
Field Details
-
NBT_CODEC
public static final Codec<net.kyori.adventure.nbt.CompoundBinaryTag,String, NBT_CODECIOException, IOException> A codec to convert between strings and NBT. -
AUTOMATIC_COMPONENT_TRANSLATION
public static boolean AUTOMATIC_COMPONENT_TRANSLATIONIf components should be automatically translated in outgoing packets. -
COMPONENT_TRANSLATOR
-
-
Method Details
-
tagStringIO
public static net.kyori.adventure.nbt.TagStringIO tagStringIO()Gets theTagStringIO
instance used to convert SNBT. This instance should be used for all Adventure related SNBT parsing and serialization. Note: This instance of theTagStringIO
is configured to accept and emit heterogeneous lists- Returns:
- the tag string IO instance
-
getDefaultLocale
Gets the default locale used to translate components when no overriding locale has been provided.- Returns:
- the default locale
-
setDefaultLocale
Sets the default locale used to translate components when no overriding locale has been provided.- Parameters:
defaultLocale
- the new default, ornull
to return toLocale.getDefault()
-
wrapNbt
-
unwrapNbt
-