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

public class DisplayNameAdapter extends Object implements Accessor
Accessor implementation for extracting display names from supported object types.

This adapter converts objects into DisplayNameable instances to support macro replacement using the {OBJECT.DISPLAY_NAME} placeholder.

Supported types include:

  • Objects implementing DisplayNameable
  • Player — mapped to Player.getDisplayName()
  • Nameable — mapped to Nameable.getCustomName()
  • World — mapped using the WorldNameResolver
See Also:
  • Constructor Details

    • DisplayNameAdapter

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