Fix armor color setting method from BGR to RGB.
The method for setting armor colors was incorrect and used `Color.fromBGR` instead of `Color.fromRGB`. This ensures proper color rendering and aligns with expected behavior.
This commit is contained in:
parent
6f99402d16
commit
7acf39b600
|
|
@ -103,7 +103,7 @@ public abstract class GameClass {
|
||||||
ItemStack itemStack = new ItemStack(material);
|
ItemStack itemStack = new ItemStack(material);
|
||||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||||
if (itemMeta instanceof LeatherArmorMeta leatherArmorMeta) {
|
if (itemMeta instanceof LeatherArmorMeta leatherArmorMeta) {
|
||||||
leatherArmorMeta.setColor(Color.fromBGR(r, g, b));
|
leatherArmorMeta.setColor(Color.fromRGB(r, g, b));
|
||||||
itemStack.setItemMeta(leatherArmorMeta);
|
itemStack.setItemMeta(leatherArmorMeta);
|
||||||
}
|
}
|
||||||
return itemStack;
|
return itemStack;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user