SPIGOT-7292: Support alpha channel in Display entities

By: Doc <nachito94@msn.com>
This commit is contained in:
CraftBukkit/Spigot 2023-03-16 19:27:57 +11:00
parent 33e9c807c6
commit 9e22d7f688
2 changed files with 4 additions and 4 deletions

View file

@ -128,7 +128,7 @@ public class CraftDisplay extends CraftEntity implements Display {
public Color getGlowColorOverride() {
int color = getHandle().getGlowColorOverride();
return (color == -1) ? null : Color.fromRGB(color);
return (color == -1) ? null : Color.fromARGB(color);
}
@Override
@ -136,7 +136,7 @@ public class CraftDisplay extends CraftEntity implements Display {
if (color == null) {
getHandle().setGlowColorOverride(-1);
} else {
getHandle().setGlowColorOverride(color.asRGB());
getHandle().setGlowColorOverride(color.asARGB());
}
}

View file

@ -53,7 +53,7 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
public Color getBackgroundColor() {
int color = getHandle().getBackgroundColor();
return (color == -1) ? null : Color.fromRGB(color);
return (color == -1) ? null : Color.fromARGB(color);
}
@Override
@ -61,7 +61,7 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
if (color == null) {
getHandle().setBackgroundColor(-1);
} else {
getHandle().setBackgroundColor(color.asRGB());
getHandle().setBackgroundColor(color.asARGB());
}
}