Class MapMeta
java.lang.Object
net.minestom.server.item.metadata.MapMeta
- All Implemented Interfaces:
ItemMeta
public class MapMeta extends java.lang.Object implements ItemMeta
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MapMeta.MapDecoration
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description ItemMeta
copy()
Copies this item meta.java.util.List<MapMeta.MapDecoration>
getDecorations()
Gets the map decorations.ChatColor
getMapColor()
Gets the map color.int
getMapId()
Gets the map id.int
getMapScaleDirection()
Gets the map scale direction.boolean
hasNbt()
Gets if this meta object contains any useful data to send to the client.boolean
isSimilar(ItemMeta itemMeta)
Gets if the two ItemMeta are similar.void
read(org.jglrxavpok.hephaistos.nbt.NBTCompound compound)
Reads nbt data from a compound.void
setDecorations(java.util.List<MapMeta.MapDecoration> decorations)
Changes the map decorations list.void
setMapColor(ChatColor mapColor)
Changes the map color.void
setMapId(int mapId)
Changes the map id.void
setMapScaleDirection(int mapScaleDirection)
Changes the map scale direction.void
write(org.jglrxavpok.hephaistos.nbt.NBTCompound compound)
Writes nbt data to a compound.
-
Constructor Details
-
Method Details
-
getMapId
public int getMapId()Gets the map id.- Returns:
- the map id
-
setMapId
public void setMapId(int mapId)Changes the map id.- Parameters:
mapId
- the new map id
-
getMapScaleDirection
public int getMapScaleDirection()Gets the map scale direction.- Returns:
- the map scale direction
-
setMapScaleDirection
public void setMapScaleDirection(int mapScaleDirection)Changes the map scale direction.- Parameters:
mapScaleDirection
- the new map scale direction
-
getDecorations
Gets the map decorations.- Returns:
- a modifiable list containing all the map decorations
-
setDecorations
Changes the map decorations list.- Parameters:
decorations
- the new map decorations list
-
getMapColor
Gets the map color.- Returns:
- the map color
-
setMapColor
Changes the map color.WARNING: RGB colors are not supported.
- Parameters:
mapColor
- the new map color
-
hasNbt
public boolean hasNbt()Description copied from interface:ItemMeta
Gets if this meta object contains any useful data to send to the client. -
isSimilar
Description copied from interface:ItemMeta
Gets if the two ItemMeta are similar.It is used by
ItemStack.isSimilar(ItemStack)
. -
read
public void read(@NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound compound)Description copied from interface:ItemMeta
Reads nbt data from a compound.WARNING: it is possible that it contains no useful data, it has to be checked before getting anything.
-
write
public void write(@NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound compound)Description copied from interface:ItemMeta
Writes nbt data to a compound. -
copy
Description copied from interface:ItemMeta
Copies this item meta.Used by
ItemStack.copy()
.
-