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 aGlobalPlaceholder
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.boolean
final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.name()
Returns the value of thename
record component.@Nullable Tag
resolve
(@NotNull String name, @NotNull ArgumentQueue arguments, @NotNull Context ctx) resolver()
Returns the value of theresolver
record 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:
resolve
in interfaceTagResolver
-
has
- Specified by:
has
in 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 thekey
record component.- Specified by:
key
in interfacePlaceholder
- Returns:
- the value of the
key
record component
-
name
Returns the value of thename
record component.- Specified by:
name
in interfacePlaceholder
- Returns:
- the value of the
name
record component
-
resolver
Returns the value of theresolver
record component.- Returns:
- the value of the
resolver
record component
-