Class DurationAdapter
java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.pipeline.accessors.duration.DurationAdapter
- All Implemented Interfaces:
Accessor
Accessor for objects that expose a
Duration via the Durationable interface.
This adapter supports macro resolution for duration-based placeholders such as
{OBJECT.DURATION}. It delegates all adaptation responsibilities to the object itself,
requiring it to explicitly implement Durationable.
This design assumes that no Bukkit-provided types expose a getDuration() method
by default. If such types are discovered in the future, they can be added to this adapter
using additional instanceof branches or method references.
Accessor type: Accessor.BuiltIn.DURATION (single-value field).
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempts to adapt the given object into aDurationableif it explicitly implements the interface.
-
Constructor Details
-
DurationAdapter
public DurationAdapter()
-
-
Method Details
-
adapt
Attempts to adapt the given object into aDurationableif it explicitly implements the interface.
-