mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 11:05:13 +01:00
SPIGOT-6935: Make Arrow color nullable
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
b9534e1c48
commit
7fe2a47414
1 changed files with 5 additions and 1 deletions
|
@ -116,11 +116,15 @@ public class CraftTippedArrow extends CraftArrow implements Arrow {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setColor(Color color) {
|
public void setColor(Color color) {
|
||||||
getHandle().setFixedColor(color.asRGB());
|
int colorRGB = (color == null) ? -1 : color.asRGB();
|
||||||
|
getHandle().setFixedColor(colorRGB);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Color getColor() {
|
public Color getColor() {
|
||||||
|
if (getHandle().getColor() <= -1) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return Color.fromRGB(getHandle().getColor());
|
return Color.fromRGB(getHandle().getColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue