Interface MapLayer.Context

Enclosing interface:
MapLayer

public static interface MapLayer.Context
What a layer paints on.
Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the canvas of the layer, cleared before each paint.
    void
    decorate(MapDecoration decoration)
    Adds an icon until the next paint of this layer.
    long
    Returns the current tick of the map ticker, to animate.
    Returns the map being painted.
    Returns the player the layer is painted for; empty for a shared layer.
  • Method Details

    • view

      MapView view()
      Returns the map being painted.
      Returns:
      the map being painted
      Since:
      0.1.0
    • viewer

      Optional<Player> viewer()
      Returns the player the layer is painted for; empty for a shared layer.
      Returns:
      the player the layer is painted for; empty for a shared layer
      Since:
      0.1.0
    • canvas

      MapCanvas canvas()
      Returns the canvas of the layer, cleared before each paint.
      Returns:
      the canvas of the layer, cleared before each paint
      Since:
      0.1.0
    • decorate

      void decorate(MapDecoration decoration)
      Adds an icon until the next paint of this layer.
      Parameters:
      decoration - the icon
      Since:
      0.1.0
    • tick

      long tick()
      Returns the current tick of the map ticker, to animate.
      Returns:
      the current tick of the map ticker, to animate
      Since:
      0.1.0