Package org.bukkit.map
Interface MapView
public interface MapView
Represents a map item.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumAn enum representing all possible scales a map can be set to.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddRenderer(@NotNull MapRenderer renderer) Add a renderer to this map.intGet the center X position of this map.intGet the center Z position of this map.intgetId()Get the ID of this map item for use withMapMeta.Get a list of MapRenderers currently in effect.getScale()Get the scale of this map.getWorld()Get the world that this map is associated with.booleanisLocked()Gets whether the map is locked or not.booleanGets whether a position cursor should be shown when the map is near its center.booleanWhether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.booleanCheck whether this map is virtual.booleanremoveRenderer(@Nullable MapRenderer renderer) Remove a renderer from this map.voidsetCenterX(int x) Set the center X position of this map.voidsetCenterZ(int z) Set the center Z position of this map.voidsetLocked(boolean locked) Gets whether the map is locked or not.voidsetScale(@NotNull MapView.Scale scale) Set the scale of this map.voidsetTrackingPosition(boolean trackingPosition) Sets whether a position cursor should be shown when the map is near its center.voidsetUnlimitedTracking(boolean unlimited) Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.voidSet the world that this map is associated with.
- 
Method Details- 
getIdint getId()Get the ID of this map item for use withMapMeta.- Returns:
- The ID of the map.
 
- 
isVirtualboolean isVirtual()Check whether this map is virtual. A map is virtual if its lowermost MapRenderer is plugin-provided.- Returns:
- Whether the map is virtual.
 
- 
getScaleGet the scale of this map.- Returns:
- The scale of the map.
 
- 
setScaleSet the scale of this map.- Parameters:
- scale- The scale to set.
 
- 
getCenterXint getCenterX()Get the center X position of this map.- Returns:
- The center X position.
 
- 
getCenterZint getCenterZ()Get the center Z position of this map.- Returns:
- The center Z position.
 
- 
setCenterXvoid setCenterX(int x) Set the center X position of this map.- Parameters:
- x- The center X position.
 
- 
setCenterZvoid setCenterZ(int z) Set the center Z position of this map.- Parameters:
- z- The center Z position.
 
- 
getWorldGet the world that this map is associated with. Primarily used by the internal renderer, but may be used by external renderers. May return null if the world the map is associated with is not loaded.- Returns:
- The World this map is associated with.
 
- 
setWorldSet the world that this map is associated with. The world is used by the internal renderer, and may also be used by external renderers.- Parameters:
- world- The World to associate this map with.
 
- 
getRenderersGet a list of MapRenderers currently in effect.- Returns:
- A List<MapRenderer>containing each map renderer.
 
- 
addRendererAdd a renderer to this map.- Parameters:
- renderer- The MapRenderer to add.
 
- 
removeRendererRemove a renderer from this map.- Parameters:
- renderer- The MapRenderer to remove.
- Returns:
- True if the renderer was successfully removed.
 
- 
isTrackingPositionboolean isTrackingPosition()Gets whether a position cursor should be shown when the map is near its center.- Returns:
- tracking status
 
- 
setTrackingPositionvoid setTrackingPosition(boolean trackingPosition) Sets whether a position cursor should be shown when the map is near its center.- Parameters:
- trackingPosition- tracking status
 
- 
isUnlimitedTrackingboolean isUnlimitedTracking()Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.- Returns:
- unlimited tracking state
 
- 
setUnlimitedTrackingvoid setUnlimitedTracking(boolean unlimited) Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.- Parameters:
- unlimited- tracking state
 
- 
isLockedboolean isLocked()Gets whether the map is locked or not. A locked map may not be explored further.- Returns:
- lock status
 
- 
setLockedvoid setLocked(boolean locked) Gets whether the map is locked or not. A locked map may not be explored further.- Parameters:
- locked- status
 
 
-