Cloneable
, ConfigurationSerializable
, ItemMeta
, PersistentDataHolder
public interface MapMeta extends ItemMeta
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() |
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). The xxxMapView
family of methods should be used instead.
|
MapView |
getMapView() |
Gets the map view that is associated with this map item.
|
boolean |
hasColor() |
Checks for existence of a map color.
|
boolean |
hasLocationName() |
Checks for existence of a location name.
|
boolean |
hasMapId() |
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). The xxxMapView
family of methods should be used instead.
|
boolean |
hasMapView() |
Checks for existence of an associated map.
|
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) |
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). The xxxMapView
family of methods should be used instead.
|
void |
setMapView(MapView map) |
Sets the associated map.
|
void |
setScaling(boolean value) |
Sets if this map is scaling or not.
|
serialize
addAttributeModifier, addEnchant, addItemFlags, 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, setVersion
getPersistentDataContainer
@Deprecated boolean hasMapId()
hasMapView()
@Deprecated int getMapId()
Plugins should check that hasMapId() returns true
before
calling this method.
getMapView()
@Deprecated void setMapId(int id)
id
- the map id to setsetMapView(org.bukkit.map.MapView)
boolean hasMapView()
@Nullable MapView getMapView()
Plugins should check that hasMapView() returns true
before
calling this method.
void setMapView(MapView map)
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.
map
- the map to setboolean isScaling()
void setScaling(boolean value)
value
- true to scaleboolean hasLocationName()
@Nullable String getLocationName()
Plugins should check that hasLocationName() returns true
before calling this method.
void setLocationName(@Nullable String name)
name
- the name to setboolean hasColor()
@Nullable Color getColor()
Plugins should check that hasColor() returns true
before
calling this method.
void setColor(@Nullable Color color)
color
- the color to setCopyright © 2019. All rights reserved.