SPIGOT-7292: Support alpha channel in Display entities

This commit is contained in:
Doc 2023-03-16 19:27:57 +11:00 committed by md_5
parent cef8bd9933
commit dbc32ffa06
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11
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());
}
}