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

public class DisplayNameAdapter extends Object implements Adapter
Adapter 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(AdapterContextContainer ctx)
      Constructs a new DisplayNameAdapter with the given context container.
      Parameters:
      ctx - the adapter context providing services such as world name resolution
  • Method Details