Record Class GlobalPlaceholder
java.lang.Object
java.lang.Record
io.github.miniplaceholders.api.placeholder.GlobalPlaceholder
- Record Components:
key- the placeholder keyname- the placeholder nameresolver- the object responsible for providing information
- All Implemented Interfaces:
Placeholder,TagResolver
public record GlobalPlaceholder(String key, String name, GlobalTagResolver resolver)
extends Record
implements Placeholder
A placeholder that can obtain data without the need to provide an
Audience
or RelationalAudience.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
TagResolver.Builder, TagResolver.Single, TagResolver.WithoutArguments -
Constructor Summary
ConstructorsConstructorDescriptionGlobalPlaceholder(String key, String name, GlobalTagResolver resolver) Creates an instance of aGlobalPlaceholderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.booleanfinal inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.name()Returns the value of thenamerecord component.@Nullable Tagresolve(@NotNull String name, @NotNull ArgumentQueue arguments, @NotNull Context ctx) resolver()Returns the value of theresolverrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
resolve
@Nullable public @Nullable Tag resolve(@NotNull @NotNull String name, @NotNull @NotNull ArgumentQueue arguments, @NotNull @NotNull Context ctx) - Specified by:
resolvein interfaceTagResolver
-
has
- Specified by:
hasin interfaceTagResolver
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
key
Returns the value of thekeyrecord component.- Specified by:
keyin interfacePlaceholder- Returns:
- the value of the
keyrecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfacePlaceholder- Returns:
- the value of the
namerecord component
-
resolver
Returns the value of theresolverrecord component.- Returns:
- the value of the
resolverrecord component
-