Package org.bukkit.inventory.meta
Interface MapMeta
- All Superinterfaces:
- Cloneable,- ConfigurationSerializable,- ItemMeta,- PersistentDataHolder
Represents a map that can be scalable.
- 
Method SummaryModifier and TypeMethodDescriptionclone()getColor()Gets the map color that is set.Gets the location name that is set.intgetMapId()Deprecated.These methods are poor API: They rely on the caller to pass in an only an integer property, and have poorly defined implementation behavior if that integer is not a valid map (the current implementation for example will generate a new map with a different ID).Gets the map view that is associated with this map item.booleanhasColor()Checks for existence of a map color.booleanChecks for existence of a location name.booleanhasMapId()Deprecated.These methods are poor API: They rely on the caller to pass in an only an integer property, and have poorly defined implementation behavior if that integer is not a valid map (the current implementation for example will generate a new map with a different ID).booleanChecks for existence of an associated map.booleanChecks to see if this map is scaling.voidSets the map color.voidsetLocationName(String name) Sets the location name.voidsetMapId(int id) Deprecated.These methods are poor API: They rely on the caller to pass in an only an integer property, and have poorly defined implementation behavior if that integer is not a valid map (the current implementation for example will generate a new map with a different ID).voidsetMapView(MapView map) Sets the associated map.voidsetScaling(boolean value) Sets if this map is scaling or not.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializableserializeMethods inherited from interface org.bukkit.inventory.meta.ItemMetaaddAttributeModifier, addEnchant, addItemFlags, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setLocalizedName, setLore, setUnbreakable, setVersionMethods inherited from interface org.bukkit.persistence.PersistentDataHoldergetPersistentDataContainer
- 
Method Details- 
hasMapIdDeprecated.These methods are poor API: They rely on the caller to pass in an only an integer property, and have poorly defined implementation behavior if that integer is not a valid map (the current implementation for example will generate a new map with a different ID). The xxxMapView family of methods should be used instead.Checks for existence of a map ID number.- Returns:
- true if this has a map ID number.
- See Also:
 
- 
getMapIdDeprecated.These methods are poor API: They rely on the caller to pass in an only an integer property, and have poorly defined implementation behavior if that integer is not a valid map (the current implementation for example will generate a new map with a different ID). The xxxMapView family of methods should be used instead.Gets the map ID that is set. This is used to determine what map is displayed.Plugins should check that hasMapId() returns truebefore calling this method.- Returns:
- the map ID that is set
- See Also:
 
- 
setMapIdDeprecated.These methods are poor API: They rely on the caller to pass in an only an integer property, and have poorly defined implementation behavior if that integer is not a valid map (the current implementation for example will generate a new map with a different ID). The xxxMapView family of methods should be used instead.Sets the map ID. This is used to determine what map is displayed.- Parameters:
- id- the map id to set
- See Also:
 
- 
hasMapViewboolean hasMapView()Checks for existence of an associated map.- Returns:
- true if this item has an associated map
 
- 
getMapViewGets the map view that is associated with this map item.Plugins should check that hasMapView() returns truebefore calling this method.- Returns:
- the map view, or null if the item hasMapView(), but this map does not exist on the server
 
- 
setMapViewSets the associated map. This is used to determine what map is displayed.The implementation may allow null to clear the associated map, but this is not required and is liable to generate a new (undefined) map when the item is first used. - Parameters:
- map- the map to set
 
- 
isScalingboolean isScaling()Checks to see if this map is scaling.- Returns:
- true if this map is scaling
 
- 
setScalingvoid setScaling(boolean value) Sets if this map is scaling or not.- Parameters:
- value- true to scale
 
- 
hasLocationNameboolean hasLocationName()Checks for existence of a location name.- Returns:
- true if this has a location name
 
- 
getLocationNameGets the location name that is set.Plugins should check that hasLocationName() returns truebefore calling this method.- Returns:
- the location name that is set
 
- 
setLocationNameSets the location name. A custom map color will alter the display of the map in an inventory slot.- Parameters:
- name- the name to set
 
- 
hasColorboolean hasColor()Checks for existence of a map color.- Returns:
- true if this has a custom map color
 
- 
getColorGets 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 truebefore calling this method.- Returns:
- the map color that is set
 
- 
setColorSets the map color. A custom map color will alter the display of the map in an inventory slot.- Parameters:
- color- the color to set
 
- 
clone
 
-