Package net.kyori.adventure.text
Interface TranslationArgument
-
- All Superinterfaces:
ComponentLike
,net.kyori.examination.Examinable
,TranslationArgumentLike
@NonExtendable public interface TranslationArgument extends TranslationArgumentLike, net.kyori.examination.Examinable
An argument that can be part of aTranslatableComponent
.- Since:
- 4.15.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NotNull TranslationArgument
asTranslationArgument()
Get the argument representation of this object.static @NotNull TranslationArgument
bool(boolean value)
Create a boolean argument.static @NotNull TranslationArgument
component(@NotNull ComponentLike value)
Create a component argument.static @NotNull TranslationArgument
numeric(@NotNull java.lang.Number value)
Create a numeric argument.@NotNull java.lang.Object
value()
The argument's value.-
Methods inherited from interface net.kyori.examination.Examinable
examinableName, examinableProperties, examine
-
Methods inherited from interface net.kyori.adventure.text.TranslationArgumentLike
asComponent
-
-
-
-
Method Detail
-
bool
@NotNull static @NotNull TranslationArgument bool(boolean value)
Create a boolean argument.- Parameters:
value
- the value- Returns:
- the argument
- Since:
- 4.15.0
- Since Minecraft:
- 1.20.3
-
numeric
@NotNull static @NotNull TranslationArgument numeric(@NotNull @NotNull java.lang.Number value)
Create a numeric argument.- Parameters:
value
- the value- Returns:
- the argument
- Since:
- 4.15.0
- Since Minecraft:
- 1.20.3
-
component
@NotNull static @NotNull TranslationArgument component(@NotNull @NotNull ComponentLike value)
Create a component argument.- Parameters:
value
- the value- Returns:
- the argument
- Since:
- 4.15.0
- Since Minecraft:
- 1.20.3
-
value
@NotNull @NotNull java.lang.Object value()
The argument's value.- Returns:
- the argument value
- Since:
- 4.15.0
-
asTranslationArgument
@NotNull default @NotNull TranslationArgument asTranslationArgument()
Description copied from interface:TranslationArgumentLike
Get the argument representation of this object.- Specified by:
asTranslationArgument
in interfaceTranslationArgumentLike
- Returns:
- the argument representation
-
-