geforkt von Mirrors/Paper
SPIGOT-5984: Add non deprecated / magic value way to set pixel in MapCanvas
By: DerFrZocker <derrieple@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
0edbb16bb4
Commit
c67855f651
@ -1,5 +1,6 @@
|
||||
package org.bukkit.craftbukkit.map;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Image;
|
||||
import java.util.Arrays;
|
||||
import org.bukkit.map.MapCanvas;
|
||||
@ -35,6 +36,21 @@ public class CraftMapCanvas implements MapCanvas {
|
||||
this.cursors = cursors;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPixelColor(int x, int y, Color color) {
|
||||
setPixel(x, y, MapPalette.matchColor(color));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getPixelColor(int x, int y) {
|
||||
return MapPalette.getColor(getPixel(x, y));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getBasePixelColor(int x, int y) {
|
||||
return MapPalette.getColor(getBasePixel(x, y));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPixel(int x, int y, byte color) {
|
||||
if (x < 0 || y < 0 || x >= 128 || y >= 128)
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren