程序包 org.bukkit.map
接口 MapView
public interface MapView
Represents a map item.
-
嵌套类概要
修饰符和类型接口说明static enum
An enum representing all possible scales a map can be set to. -
方法概要
修饰符和类型方法说明void
addRenderer
(@NotNull MapRenderer renderer) Add a renderer to this map.int
Get the center X position of this map.int
Get the center Z position of this map.int
getId()
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.boolean
isLocked()
Gets whether the map is locked or not.boolean
Gets whether a position cursor should be shown when the map is near its center.boolean
Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.boolean
Check whether this map is virtual.boolean
removeRenderer
(@Nullable MapRenderer renderer) Remove a renderer from this map.void
setCenterX
(int x) Set the center X position of this map.void
setCenterZ
(int z) Set the center Z position of this map.void
setLocked
(boolean locked) Gets whether the map is locked or not.void
setScale
(@NotNull MapView.Scale scale) Set the scale of this map.void
setTrackingPosition
(boolean trackingPosition) Sets whether a position cursor should be shown when the map is near its center.void
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.void
Set the world that this map is associated with.
-
方法详细资料
-
getId
int getId()Get the ID of this map item for use withMapMeta
.- 返回:
- The ID of the map.
-
isVirtual
boolean isVirtual()Check whether this map is virtual. A map is virtual if its lowermost MapRenderer is plugin-provided.- 返回:
- Whether the map is virtual.
-
getScale
Get the scale of this map.- 返回:
- The scale of the map.
-
setScale
Set the scale of this map.- 参数:
scale
- The scale to set.
-
getCenterX
int getCenterX()Get the center X position of this map.- 返回:
- The center X position.
-
getCenterZ
int getCenterZ()Get the center Z position of this map.- 返回:
- The center Z position.
-
setCenterX
void setCenterX(int x) Set the center X position of this map.- 参数:
x
- The center X position.
-
setCenterZ
void setCenterZ(int z) Set the center Z position of this map.- 参数:
z
- The center Z position.
-
getWorld
Get 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.- 返回:
- The World this map is associated with.
-
setWorld
Set the world that this map is associated with. The world is used by the internal renderer, and may also be used by external renderers.- 参数:
world
- The World to associate this map with.
-
getRenderers
Get a list of MapRenderers currently in effect.- 返回:
- A
List<MapRenderer>
containing each map renderer.
-
addRenderer
Add a renderer to this map.- 参数:
renderer
- The MapRenderer to add.
-
removeRenderer
Remove a renderer from this map.- 参数:
renderer
- The MapRenderer to remove.- 返回:
- True if the renderer was successfully removed.
-
isTrackingPosition
boolean isTrackingPosition()Gets whether a position cursor should be shown when the map is near its center.- 返回:
- tracking status
-
setTrackingPosition
void setTrackingPosition(boolean trackingPosition) Sets whether a position cursor should be shown when the map is near its center.- 参数:
trackingPosition
- tracking status
-
isUnlimitedTracking
boolean isUnlimitedTracking()Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.- 返回:
- unlimited tracking state
-
setUnlimitedTracking
void 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.- 参数:
unlimited
- tracking state
-
isLocked
boolean isLocked()Gets whether the map is locked or not. A locked map may not be explored further.- 返回:
- lock status
-
setLocked
void setLocked(boolean locked) Gets whether the map is locked or not. A locked map may not be explored further.- 参数:
locked
- status
-