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 booleanhas(@NotNull java.lang.String name)Check if this resolver knows of a tag.@NotNull java.lang.Stringkey()The key this resolver matches.default @Nullable Tagresolve(@NotNull java.lang.String name)Resolve a tag based only on the provided name.@NotNull Tagtag()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(@NotNull @NotNull java.lang.String name)
Description copied from interface:TagResolver.WithoutArgumentsResolve a tag based only on the provided name.- Specified by:
resolvein 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.WithoutArgumentsCheck if this resolver knows of a tag.- Specified by:
hasin interfaceTagResolver- Specified by:
hasin interfaceTagResolver.WithoutArguments- Parameters:
name- the tag name- Returns:
- whether this tag is present
-
-