Class DurationAdapter
java.lang.Object
com.winterhavenmc.library.messagebuilder.pipeline.adapters.duration.DurationAdapter
- All Implemented Interfaces:
Adapter
Adapter 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.
Adapter type: Adapter.BuiltIn.DURATION
(single-value field).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.winterhavenmc.library.messagebuilder.pipeline.adapters.Adapter
Adapter.BuiltIn
-
Field Summary
Fields inherited from interface com.winterhavenmc.library.messagebuilder.pipeline.adapters.Adapter
UNKNOWN_VALUE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempts to adapt the given object into aDurationable
if it explicitly implements the interface.
-
Constructor Details
-
DurationAdapter
public DurationAdapter()
-
-
Method Details
-
adapt
Attempts to adapt the given object into aDurationable
if it explicitly implements the interface.
-