public interface MapMeta extends ItemMeta
Modifier and Type | Method and Description |
---|---|
@NotNull MapMeta |
clone() |
@Nullable Color |
getColor()
Gets the map color that is set.
|
@Nullable 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.
|
@Nullable 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(@Nullable Color color)
Sets the map color.
|
void |
setLocationName(@Nullable 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.
|
addAttributeModifier, addEnchant, addItemFlags, displayName, displayName, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, getLoreComponents, getPlaceableKeys, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, hasPlaceableKeys, isUnbreakable, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setLocalizedName, setLore, setLoreComponents, setPlaceableKeys, setUnbreakable, setVersion
serialize
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 @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 @Nullable String getLocationName()
Plugins should check that hasLocationName() returns true
before calling this method.
void setLocationName(@Nullable @Nullable String name)
name
- the name to setboolean hasColor()
@Nullable @Nullable Color getColor()
Plugins should check that hasColor() returns true
before
calling this method.
void setColor(@Nullable @Nullable Color color)
color
- the color to setCopyright © 2021. All rights reserved.