java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.pipeline.accessors.pluralname.PluralNameAdapter
All Implemented Interfaces:
Accessor

public class PluralNameAdapter extends Object implements 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:

See Also:
  • Constructor Details

    • PluralNameAdapter

      public PluralNameAdapter(AccessorCtx ctx)
      Constructs a new PluralNameAdapter with the given context container.
      Parameters:
      ctx - the adapter context providing services such as world name resolution
  • Method Details

    • adapt

      public Optional<PluralNameable> adapt(Object obj)
      Attempts to adapt the given object to a PluralNameable instance.
      Specified by:
      adapt in interface Accessor
      Parameters:
      obj - the object to adapt
      Returns:
      an optional PluralNameable if supported, or empty otherwise