Class endstone::MapMeta¶
ClassList > endstone > MapMeta
Represents the metadata for a map item.
#include <endstone/inventory/meta/map_meta.h>
Inherits the following classes: endstone::ItemMeta
Public Types inherited from endstone::ItemMeta¶
Type | Name |
---|---|
enum | Type |
Public Static Attributes inherited from endstone::ItemMeta¶
Type | Name |
---|---|
ItemMeta | EMPTY |
Public Functions¶
Type | Name |
---|---|
ItemMeta () = default |
|
ItemMeta (const ItemMeta * meta) |
|
virtual std::unique_ptr< ItemMeta > | clone () override const Creates a clone of the current metadata. |
virtual Type | getType () override const Gets the type of this item meta. |
Public Functions inherited from endstone::ItemMeta¶
Type | Name |
---|---|
ItemMeta () = default |
|
ItemMeta (const ItemMeta * meta) |
|
virtual std::unique_ptr< ItemMeta > | clone () const Creates a clone of the current metadata. |
virtual int | getDamage () const Gets the damage. |
virtual std::optional< std::string > | getDisplayName () const Gets the display name that is set. |
virtual std::optional< std::vector< std::string > > | getLore () const Gets the lore that is set. |
virtual Type | getType () const Gets the type of this item meta. |
virtual bool | hasDamage () const Checks to see if this item has damage. |
virtual bool | hasDisplayName () const Checks for existence of a display name. |
virtual bool | hasLore () const Checks for existence of lore. |
virtual bool | isEmpty () const Checks if the item metadata is empty. |
virtual void | setDamage (int damage) Sets the damage. |
virtual void | setDisplayName (std::optional< std::string > name) Sets the display name. |
virtual void | setLore (std::optional< std::vector< std::string > > lore) Sets the lore for this item or removes lore when given std::nullopt. |
virtual | ~ItemMeta () = default |
Public Functions Documentation¶
function ItemMeta [½]¶
function ItemMeta [2/2]¶
function clone¶
Creates a clone of the current metadata.
Returns:
A copy of the metadata containing the same state as the original.
Implements endstone::ItemMeta::clone
function getType¶
Gets the type of this item meta.
Returns:
type of this item meta
Implements endstone::ItemMeta::getType
The documentation for this class was generated from the following file include/endstone/inventory/meta/map_meta.h