Class GlowMapCanvas

All Implemented Interfaces:

public final class GlowMapCanvas extends Object implements
Represents a canvas for drawing to a map. Each canvas is associated with a specific MapRenderer and represents that renderer's layer on the map.
  • Field Details

  • Constructor Details

    • GlowMapCanvas

      protected GlowMapCanvas( mapView)
  • Method Details

    • createAndRender

      public static GlowMapCanvas createAndRender( mapView, org.bukkit.entity.Player player)
      Creates a new GlowMapCanvas for the given MapView and applies all updates seen by the given player.
      mapView - The MapView to associate with this canvas and render
      player - The player to pass to MapRenderer.render(MapView, MapCanvas, Player)
      a new, rendered GlowMapCanvas
    • update

      public void update(org.bukkit.entity.Player player)
      Applies all updates seen by the given player according to the MapView's renderers.
      player - The player to pass to MapRenderer.render(MapView, MapCanvas, Player)
    • setPixel

      public void setPixel(int x, int y, byte color)
      Specified by:
      setPixel in interface
    • getPixel

      public byte getPixel(int x, int y)
      Specified by:
      getPixel in interface
    • getBasePixel

      public byte getBasePixel(int x, int y)
      Specified by:
      getBasePixel in interface
    • setBase

      protected void setBase(byte... base)
    • drawImage

      public void drawImage(int x, int y, Image image)
      Specified by:
      drawImage in interface
    • drawText

      public void drawText(int x, int y, font, String text)
      Specified by:
      drawText in interface
    • toSection

      public MapDataMessage.Section toSection()
      Converts a snapshot of this canvas to a MapDataMessage.Section for transmission to the client.
      a MapDataMessage.Section holding a copy of this canvas's contents
    • getBuffer

      protected byte[] getBuffer()
    • getMapView

      public getMapView()
      Specified by:
      getMapView in interface
    • getCursors

      public getCursors()
      Specified by:
      getCursors in interface
    • setCursors

      public void setCursors( cursors)
      Specified by:
      setCursors in interface