Package be.seeseemelk.mockbukkit.map
Class MapCanvasMock
java.lang.Object
be.seeseemelk.mockbukkit.map.MapCanvasMock
- All Implemented Interfaces:
org.bukkit.map.MapCanvas
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidstatic voidexecuteForAllPixels(BiConsumer<Integer, Integer> consumer) Runs a Consumer for each pixel coordinate on a map.bytegetBasePixel(int x, int y) @NotNull ColorgetBasePixelColor(int x, int y) @NotNull org.bukkit.map.MapCursorCollection@NotNull org.bukkit.map.MapViewbytegetPixel(int x, int y) @NotNull ColorgetPixelColor(int x, int y) protected voidsetBase(byte[][] base) voidsetCursors(@NotNull org.bukkit.map.MapCursorCollection cursors) voidsetPixel(int x, int y, byte color) voidsetPixelColor(int x, int y, @NotNull Color color)
-
Constructor Details
-
MapCanvasMock
-
-
Method Details
-
getMapView
@NotNull public @NotNull org.bukkit.map.MapView getMapView()- Specified by:
getMapViewin interfaceorg.bukkit.map.MapCanvas
-
getCursors
@NotNull public @NotNull org.bukkit.map.MapCursorCollection getCursors()- Specified by:
getCursorsin interfaceorg.bukkit.map.MapCanvas
-
setCursors
public void setCursors(@NotNull @NotNull org.bukkit.map.MapCursorCollection cursors) - Specified by:
setCursorsin interfaceorg.bukkit.map.MapCanvas
-
setPixelColor
- Specified by:
setPixelColorin interfaceorg.bukkit.map.MapCanvas
-
getPixelColor
- Specified by:
getPixelColorin interfaceorg.bukkit.map.MapCanvas
-
getBasePixelColor
- Specified by:
getBasePixelColorin interfaceorg.bukkit.map.MapCanvas
-
setPixel
public void setPixel(int x, int y, byte color) - Specified by:
setPixelin interfaceorg.bukkit.map.MapCanvas
-
getPixel
public byte getPixel(int x, int y) - Specified by:
getPixelin interfaceorg.bukkit.map.MapCanvas
-
getBasePixel
public byte getBasePixel(int x, int y) - Specified by:
getBasePixelin interfaceorg.bukkit.map.MapCanvas
-
setBase
protected void setBase(byte[][] base) -
drawImage
- Specified by:
drawImagein interfaceorg.bukkit.map.MapCanvas
-
drawText
public void drawText(int x, int y, @NotNull @NotNull org.bukkit.map.MapFont font, @NotNull @NotNull String text) - Specified by:
drawTextin interfaceorg.bukkit.map.MapCanvas
-
executeForAllPixels
Runs a Consumer for each pixel coordinate on a map.- Parameters:
consumer- The consumer to run. First parameter is the X coordinate, second is the Y coordinate.
-