程序包 org.bukkit.map

接口 MapView


public interface MapView
表示地图物品。
  • 方法详细资料

    • getId

      int getId()
      获取此地图物品的ID,用于MapMeta。

      原文: Get the ID of this map item for use with MapMeta.

      返回:
      地图的ID。
    • isVirtual

      boolean isVirtual()
      检查此地图是否是虚拟的。如果地图最底层的MapRenderer是由插件提供的,则该地图是虚拟的。

      原文: Check whether this map is virtual. A map is virtual if its lowermost MapRenderer is plugin-provided.

      返回:
      地图是否是虚拟的。
    • getScale

      获取此地图的比例。

      原文: Get the scale of this map.

      返回:
      地图的比例。
    • setScale

      void setScale(@NotNull @NotNull MapView.Scale scale)
      设置此地图的比例。

      原文: Set the scale of this map.

      参数:
      scale - 要设置的比例。
    • getCenterX

      int getCenterX()
      获取此地图的中心X位置。

      原文: Get the center X position of this map.

      返回:
      中心X位置。
    • getCenterZ

      int getCenterZ()
      获取此地图的中心Z位置。

      原文: Get the center Z position of this map.

      返回:
      中心Z位置。
    • setCenterX

      void setCenterX(int x)
      设置此地图的中心X位置。

      原文: Set the center X position of this map.

      参数:
      x - 中心X位置。
    • setCenterZ

      void setCenterZ(int z)
      设置此地图的中心Z位置。

      原文: Set the center Z position of this map.

      参数:
      z - 中心Z位置。
    • getWorld

      获取此地图关联的世界。主要由内部渲染器使用,但也可供外部渲染器使用。如果地图关联的世界未加载,则可能返回null。

      原文: 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.

      返回:
      此地图关联的World对象。
    • setWorld

      void setWorld(@NotNull @NotNull World world)
      设置此地图关联的世界。该世界由内部渲染器使用,也可供外部渲染器使用。

      原文: 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 - 要与此地图关联的World对象。
    • getRenderers

      获取当前生效的MapRenderers列表。

      原文: Get a list of MapRenderers currently in effect.

      返回:
      包含每个地图渲染器的List<MapRenderer>。
    • addRenderer

      void addRenderer(@NotNull @NotNull MapRenderer renderer)
      向此地图添加渲染器。

      原文: Add a renderer to this map.

      参数:
      renderer - 要添加的MapRenderer。
    • removeRenderer

      boolean removeRenderer(@Nullable @Nullable MapRenderer renderer)
      从此地图移除渲染器。

      原文: Remove a renderer from this map.

      参数:
      renderer - 要移除的MapRenderer。
      返回:
      如果渲染器被成功移除则返回true。
    • isTrackingPosition

      boolean isTrackingPosition()
      获取当地图接近其中心时是否应显示位置光标。

      原文: Gets whether a position cursor should be shown when the map is near its center.

      返回:
      跟踪状态。
    • setTrackingPosition

      void setTrackingPosition(boolean trackingPosition)
      设置当地图接近其中心时是否应显示位置光标。

      原文: Sets whether a position cursor should be shown when the map is near its center.

      参数:
      trackingPosition - 跟踪状态。
    • isUnlimitedTracking

      boolean isUnlimitedTracking()
      当光标超出地图范围时,地图是否显示较小的位置光标(true),或不显示位置光标(false)。

      原文: Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.

      返回:
      无限制跟踪状态。
    • setUnlimitedTracking

      void setUnlimitedTracking(boolean unlimited)
      当光标超出地图范围时,地图是否显示较小的位置光标(true),或不显示位置光标(false)。

      原文: Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.

      参数:
      unlimited - 无限制跟踪状态。
    • isLocked

      boolean isLocked()
      获取地图是否被锁定。 被锁定的地图无法进一步探索。

      原文: Gets whether the map is locked or not. A locked map may not be explored further.

      返回:
      锁定状态。
    • setLocked

      void setLocked(boolean locked)
      设置地图是否被锁定。 被锁定的地图无法进一步探索。

      原文: Gets whether the map is locked or not. A locked map may not be explored further.

      参数:
      locked - 锁定状态。