Class PluralNameAdapter
java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.pipeline.accessors.pluralname.PluralNameAdapter
- All Implemented Interfaces:
Accessor
Accessor implementation for extracting display names from supported object types.
This adapter converts objects into PluralNameable instances to support macro
replacement using the {OBJECT.DISPLAY_NAME} placeholder.
Supported types include:
- Objects implementing
PluralNameable ItemStack— mapped toPluralNameable.getPluralName()
ItemPluralNameResolver
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.Accessor
Accessor.BuiltIn -
Field Summary
Fields inherited from interface com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.Accessor
UNKNOWN_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newPluralNameAdapterwith the given context container. -
Method Summary
Modifier and TypeMethodDescriptionAttempts to adapt the given object to aPluralNameableinstance.
-
Constructor Details
-
PluralNameAdapter
Constructs a newPluralNameAdapterwith the given context container.- Parameters:
ctx- the adapter context providing services such as world name resolution
-
-
Method Details
-
adapt
Attempts to adapt the given object to aPluralNameableinstance.
-