public final class GlowMapCanvas extends Object implements org.bukkit.map.MapCanvas
MapRenderer
and represents that renderer's layer on the map.Modifier and Type | Field and Description |
---|---|
static int |
MAP_SIZE |
Modifier | Constructor and Description |
---|---|
protected |
GlowMapCanvas(org.bukkit.map.MapView mapView) |
Modifier and Type | Method and Description |
---|---|
static GlowMapCanvas |
createAndRender(org.bukkit.map.MapView mapView,
org.bukkit.entity.Player player)
Creates a new GlowMapCanvas for the given
MapView and applies all updates seen by the
given player. |
void |
drawImage(int x,
int y,
Image image) |
void |
drawText(int x,
int y,
org.bukkit.map.MapFont font,
String text) |
byte |
getBasePixel(int x,
int y) |
protected byte[] |
getBuffer() |
org.bukkit.map.MapCursorCollection |
getCursors() |
org.bukkit.map.MapView |
getMapView() |
byte |
getPixel(int x,
int y) |
protected void |
setBase(byte... base) |
void |
setCursors(org.bukkit.map.MapCursorCollection cursors) |
void |
setPixel(int x,
int y,
byte color) |
MapDataMessage.Section |
toSection()
Converts a snapshot of this canvas to a
MapDataMessage.Section for transmission to the client. |
void |
update(org.bukkit.entity.Player player)
Applies all updates seen by the given player according to the
MapView 's renderers. |
public static final int MAP_SIZE
public static GlowMapCanvas createAndRender(org.bukkit.map.MapView mapView, org.bukkit.entity.Player player)
MapView
and applies all updates seen by the
given player.mapView
- The MapView
to associate with this canvas and renderplayer
- The player to pass to MapRenderer.render(MapView, MapCanvas, Player)
public void update(org.bukkit.entity.Player player)
MapView
's renderers.player
- The player to pass to MapRenderer.render(MapView, MapCanvas, Player)
public void setPixel(int x, int y, byte color)
setPixel
in interface org.bukkit.map.MapCanvas
public byte getPixel(int x, int y)
getPixel
in interface org.bukkit.map.MapCanvas
public byte getBasePixel(int x, int y)
getBasePixel
in interface org.bukkit.map.MapCanvas
protected void setBase(byte... base)
public void drawImage(int x, int y, Image image)
drawImage
in interface org.bukkit.map.MapCanvas
public void drawText(int x, int y, org.bukkit.map.MapFont font, String text)
drawText
in interface org.bukkit.map.MapCanvas
public MapDataMessage.Section toSection()
MapDataMessage.Section
for transmission to the client.MapDataMessage.Section
holding a copy of this canvas's contentsprotected byte[] getBuffer()
public org.bukkit.map.MapView getMapView()
getMapView
in interface org.bukkit.map.MapCanvas
public org.bukkit.map.MapCursorCollection getCursors()
getCursors
in interface org.bukkit.map.MapCanvas
public void setCursors(org.bukkit.map.MapCursorCollection cursors)
setCursors
in interface org.bukkit.map.MapCanvas
Copyright © 2021. All rights reserved.