程序包 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
(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.short
getId()
已过时。Magic valueGet 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
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
(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
setScale
(MapView.Scale scale) Set the scale of this map.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
已过时。Magic valueGet the ID of this map item. Corresponds to the damage value of a map in an inventory.- 返回:
- 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
MapView.Scale 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
World 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
List<MapRenderer> 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.
-
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
-