Class BukkitQuantityAccessor
java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.pipeline.accessors.quantity.BukkitQuantityAccessor
- All Implemented Interfaces:
Accessor
Accessor implementation for extracting quantity values from supported objects.
This adapter enables macro substitution for {OBJECT.QUANTITY} by adapting
known types into Quantifiable instances. Supported types include:
Quantifiable— directly implemented by pluginsItemStack— maps togetAmount()Chest— maps to inventory size viagetInventory().getSize()Inventory— maps to inventory size viagetSize()Collection— maps tosize()
Plugins may implement Quantifiable directly to add custom macro support
for other object types.
- 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 aQuantifiableinstance.
-
Constructor Details
-
BukkitQuantityAccessor
public BukkitQuantityAccessor()
-
-
Method Details
-
adapt
Attempts to adapt the given object into aQuantifiableinstance.
-