Interface TagResolver.Single
-
- All Superinterfaces:
TagResolver
,TagResolver.WithoutArguments
- Enclosing interface:
- TagResolver
@NonExtendable public static interface TagResolver.Single extends TagResolver.WithoutArguments
A resolver that only handles a single tag key.- Since:
- 4.10.0
- See Also:
TagResolver.resolver(String, Tag)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
TagResolver.Builder, TagResolver.Single, TagResolver.WithoutArguments
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
has(@NotNull java.lang.String name)
Check if this resolver knows of a tag.@NotNull java.lang.String
key()
The key this resolver matches.default @Nullable Tag
resolve(@NotNull java.lang.String name)
Resolve a tag based only on the provided name.@NotNull Tag
tag()
The tag returned by this resolver when the key is matching.-
Methods inherited from interface net.kyori.adventure.text.minimessage.tag.resolver.TagResolver.WithoutArguments
resolve
-
-
-
-
Method Detail
-
key
@NotNull @NotNull java.lang.String key()
The key this resolver matches.The returned key is compared case-insensitively.
- Returns:
- the key
- Since:
- 4.10.0
-
tag
@NotNull @NotNull Tag tag()
The tag returned by this resolver when the key is matching.- Returns:
- the tag
- Since:
- 4.10.0
-
resolve
@Nullable default @Nullable Tag resolve(@TagPattern @NotNull @NotNull java.lang.String name)
Description copied from interface:TagResolver.WithoutArguments
Resolve a tag based only on the provided name.- Specified by:
resolve
in interfaceTagResolver.WithoutArguments
- Parameters:
name
- the provided name- Returns:
- a tag, if any is known.
-
has
default boolean has(@NotNull @NotNull java.lang.String name)
Description copied from interface:TagResolver.WithoutArguments
Check if this resolver knows of a tag.- Specified by:
has
in interfaceTagResolver
- Specified by:
has
in interfaceTagResolver.WithoutArguments
- Parameters:
name
- the tag name- Returns:
- whether this tag is present
-
-