Cloneable
, ConfigurationSerializable
, ItemMeta
public interface MapMeta extends ItemMeta
ItemMeta.Spigot
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).
|
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).
|
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).
|
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, getCanDestroy, getCanPlaceOn, getCustomTagContainer, getDestroyableKeys, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, getPlaceableKeys, hasAttributeModifiers, hasConflictingEnchant, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, hasPlaceableKeys, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setDestroyableKeys, setDisplayName, setLocalizedName, setLore, setPlaceableKeys, setUnbreakable, spigot
@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 © 2020. All rights reserved.