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() { public Color getGlowColorOverride() {
int color = getHandle().getGlowColorOverride(); int color = getHandle().getGlowColorOverride();
return (color == -1) ? null : Color.fromRGB(color); return (color == -1) ? null : Color.fromARGB(color);
} }
@Override @Override
@@ -136,7 +136,7 @@ public class CraftDisplay extends CraftEntity implements Display {
if (color == null) { if (color == null) {
getHandle().setGlowColorOverride(-1); getHandle().setGlowColorOverride(-1);
} else { } 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() { public Color getBackgroundColor() {
int color = getHandle().getBackgroundColor(); int color = getHandle().getBackgroundColor();
return (color == -1) ? null : Color.fromRGB(color); return (color == -1) ? null : Color.fromARGB(color);
} }
@Override @Override
@@ -61,7 +61,7 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
if (color == null) { if (color == null) {
getHandle().setBackgroundColor(-1); getHandle().setBackgroundColor(-1);
} else { } else {
getHandle().setBackgroundColor(color.asRGB()); getHandle().setBackgroundColor(color.asARGB());
} }
} }