Class CookieComponent.CookieComponentCodec
java.lang.Object
tech.skworks.tachyon.exampleplugin.component.CookieComponent.CookieComponentCodec
- All Implemented Interfaces:
ComponentCodec<CookieComponent>, ComponentPreviewHandler<org.bukkit.inventory.ItemStack, CookieComponent>
- Enclosing class:
CookieComponent
public static class CookieComponent.CookieComponentCodec
extends Object
implements ComponentCodec<CookieComponent>, ComponentPreviewHandler<org.bukkit.inventory.ItemStack, CookieComponent>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStack[]Builds the detailed data display of the component from its Record instance.org.bukkit.inventory.ItemStackBuilds the global representative icon for this component.decode(org.bson.BsonDocument bson) org.bson.BsonDocumentencode(CookieComponent component)
-
Constructor Details
-
CookieComponentCodec
public CookieComponentCodec()
-
-
Method Details
-
getComponentNamespace
- Specified by:
getComponentNamespacein interfaceComponentCodec<CookieComponent>
-
getComponentClass
- Specified by:
getComponentClassin interfaceComponentCodec<CookieComponent>
-
encode
- Specified by:
encodein interfaceComponentCodec<CookieComponent>
-
decode
- Specified by:
decodein interfaceComponentCodec<CookieComponent>
-
buildComponentIcon
public org.bukkit.inventory.ItemStack buildComponentIcon()Description copied from interface:ComponentPreviewHandlerBuilds the global representative icon for this component.This icon is typically used in selection and navigation menus (for example, in the sub-menu of a FULL snapshot to list all components available for viewing).
- Specified by:
buildComponentIconin interfaceComponentPreviewHandler<org.bukkit.inventory.ItemStack, CookieComponent>- Returns:
- The visual object (of type
T) serving as the icon to represent this component.
-
buildComponentDataDisplay
Description copied from interface:ComponentPreviewHandlerBuilds the detailed data display of the component from its Record instance.This method takes the decoded business data record and transforms it into a structured set of visual elements. The returned array will be directly injected into the final inventory or preview menu (e.g., the exact layout of items in an Enderchest, or a paginated list of statistics).
- Specified by:
buildComponentDataDisplayin interfaceComponentPreviewHandler<org.bukkit.inventory.ItemStack, CookieComponent>- Parameters:
record- The Record instance containing the player data for this component.- Returns:
- An array of visual objects (of type
T) representing the complete and formatted content of the component.
-