Package com.winterhavenmc.library.messagebuilder.pipeline.adapters.quantity
package com.winterhavenmc.library.messagebuilder.pipeline.adapters.quantity
Provides support for macro replacement of quantity-related values.
This package includes the Quantifiable
interface, which is used to represent objects that can supply a numeric quantity for macro substitution. These
quantities are commonly used in messages to represent values such as:
- Item stack sizes (
ItemStack
) - Inventory or chest capacities (
Inventory
,Chest
) - Collection sizes
- Custom plugin-defined types that implement
Quantifiable
The QuantityAdapter
provides automatic adaptation for known Bukkit types as well as user-defined classes.
When an object is adapted as a Quantifiable
, it contributes the {OBJECT.QUANTITY}
macro to the pipeline, populated with a localized, formatted number string based on the current locale.
- See Also:
-
ClassDescriptionRepresents objects that expose a numerical quantity for macro replacement.Adapter implementation for extracting quantity values from supported objects.