Package org.bukkit.inventory.meta
Interface MapMeta
-
- All Superinterfaces:
Cloneable
,ConfigurationSerializable
,ItemMeta
public interface MapMeta extends ItemMeta
Represents a map that can be scalable.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.bukkit.inventory.meta.ItemMeta
ItemMeta.Spigot
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MapMeta
clone()
Color
getColor()
Gets the map color that is set.String
getLocationName()
Gets the location name that is set.int
getMapId()
Gets the map ID that is set.boolean
hasColor()
Checks for existence of a map color.boolean
hasLocationName()
Checks for existence of a location name.boolean
hasMapId()
Checks for existence of a map ID number.boolean
isScaling()
Checks to see if this map is scaling.void
setColor(Color color)
Sets the map color.void
setLocationName(String name)
Sets the location name.void
setMapId(int id)
Sets the map ID.void
setScaling(boolean value)
Sets if this map is scaling or not.-
Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
Methods inherited from interface org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasAttributeModifiers, hasConflictingEnchant, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setDisplayName, setLocalizedName, setLore, setUnbreakable, spigot
-
-
-
-
Method Detail
-
hasMapId
boolean hasMapId()
Checks for existence of a map ID number.- Returns:
- true if this has a map ID number.
-
getMapId
int getMapId()
Gets the map ID that is set. This is used to determine what map is displayed.Plugins should check that hasMapId() returns
true
before calling this method.- Returns:
- the map ID that is set
-
setMapId
void setMapId(int id)
Sets the map ID. This is used to determine what map is displayed.- Parameters:
id
- the map id to set
-
isScaling
boolean isScaling()
Checks to see if this map is scaling.- Returns:
- true if this map is scaling
-
setScaling
void setScaling(boolean value)
Sets if this map is scaling or not.- Parameters:
value
- true to scale
-
hasLocationName
boolean hasLocationName()
Checks for existence of a location name.- Returns:
- true if this has a location name
-
getLocationName
String getLocationName()
Gets the location name that is set.Plugins should check that hasLocationName() returns
true
before calling this method.- Returns:
- the location name that is set
-
setLocationName
void setLocationName(String name)
Sets the location name. A custom map color will alter the display of the map in an inventory slot.- Parameters:
name
- the name to set
-
hasColor
boolean hasColor()
Checks for existence of a map color.- Returns:
- true if this has a custom map color
-
getColor
Color getColor()
Gets the map color that is set. A custom map color will alter the display of the map in an inventory slot.Plugins should check that hasColor() returns
true
before calling this method.- Returns:
- the map color that is set
-
setColor
void setColor(Color color)
Sets the map color. A custom map color will alter the display of the map in an inventory slot.- Parameters:
color
- the color to set
-
-