Class MinestomAdventure
java.lang.Object
net.minestom.server.adventure.MinestomAdventure
Adventure related constants, etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanIf components should be automatically translated in outgoing packets.static BiFunction<Component, Locale, Component> static final Codec<CompoundBinaryTag, String, IOException, IOException> A codec to convert between strings and NBT. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocaleGets the default locale used to translate components when no overriding locale has been provided.static voidsetDefaultLocale(@Nullable Locale defaultLocale) Sets the default locale used to translate components when no overriding locale has been provided.static TagStringIOGets theTagStringIOinstance used to convert SNBT.static BinaryTagunwrapNbt(BinaryTagHolder holder) static BinaryTagHolder
-
Field Details
-
NBT_CODEC
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
Gets theTagStringIOinstance used to convert SNBT. This instance should be used for all Adventure related SNBT parsing and serialization. Note: This instance of theTagStringIOis 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, ornullto return toLocale.getDefault()
-
wrapNbt
-
unwrapNbt
-