Package ke.ric.renderer.api
Class RenderedMap
java.lang.Object
ke.ric.renderer.api.RenderedMap
- All Implemented Interfaces:
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 TypeMethodDescriptionvoidclose()Idempotently detaches only this helper's renderer, leaving other renderers untouched.static RenderedMapcreate(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.ItemStackCreates an item referring to this map, without delivering it to any inventory.voidupdate(byte[] palette) Replaces the palette; every canvas receives the update on its next render.org.bukkit.map.MapViewview()Returns the newly created map view; the caller must not reuse its renderer elsewhere.
-
Method Details
-
create
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
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:
closein interfaceAutoCloseable
-