Class RenderedMap

java.lang.Object
ke.ric.renderer.api.RenderedMap
All Implemented Interfaces:
AutoCloseable

public final class RenderedMap extends Object implements AutoCloseable
Optional 128x128 palette-backed map, created fresh for its caller. All operations require the server thread. Does not convert images, write inventories, persist data, or take over existing maps. This development-preview helper should be validated with the matching development provider.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Idempotently detaches only this helper's renderer, leaving other renderers untouched.
    create(org.bukkit.World world, byte[] palette)
    Creates a new map in this world using a defensive copy of exactly 16384 palette bytes.
    org.bukkit.inventory.ItemStack
    item(String name)
    Creates an item referring to this map, without delivering it to any inventory.
    void
    update(byte[] palette)
    Replaces the palette; every canvas receives the update on its next render.
    org.bukkit.map.MapView
    Returns the newly created map view; the caller must not reuse its renderer elsewhere.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static RenderedMap create(org.bukkit.World world, byte[] palette)
      Creates a new map in this world using a defensive copy of exactly 16384 palette bytes.
    • update

      public void update(byte[] palette)
      Replaces the palette; every canvas receives the update on its next render.
    • item

      public org.bukkit.inventory.ItemStack item(String name)
      Creates an item referring to this map, without delivering it to any inventory.
    • view

      public org.bukkit.map.MapView view()
      Returns the newly created map view; the caller must not reuse its renderer elsewhere.
    • close

      public void close()
      Idempotently detaches only this helper's renderer, leaving other renderers untouched.
      Specified by:
      close in interface AutoCloseable