Bukkit likes to be backwards it seems.
Instead of RGB they do BGR...like seriously!?!?
This commit is contained in:
parent
0aeaa26d1e
commit
ba3bbe095b
@ -55,7 +55,7 @@ public class JailingListener implements Listener {
|
|||||||
ItemStack item = new ItemStack(Material.valueOf(helmet[0]));
|
ItemStack item = new ItemStack(Material.valueOf(helmet[0]));
|
||||||
LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
|
LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
|
||||||
String[] colors = helmet[1].split(",");
|
String[] colors = helmet[1].split(",");
|
||||||
meta.setColor(Color.fromBGR(Integer.parseInt(colors[0]), Integer.parseInt(colors[1]), Integer.parseInt(colors[2])));
|
meta.setColor(Color.fromBGR(Integer.parseInt(colors[2]), Integer.parseInt(colors[1]), Integer.parseInt(colors[0])));
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
event.getPlayer().getInventory().setHelmet(item);
|
event.getPlayer().getInventory().setHelmet(item);
|
||||||
default:
|
default:
|
||||||
@ -71,7 +71,7 @@ public class JailingListener implements Listener {
|
|||||||
ItemStack item = new ItemStack(Material.valueOf(chest[0]));
|
ItemStack item = new ItemStack(Material.valueOf(chest[0]));
|
||||||
LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
|
LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
|
||||||
String[] colors = chest[1].split(",");
|
String[] colors = chest[1].split(",");
|
||||||
meta.setColor(Color.fromBGR(Integer.parseInt(colors[0]), Integer.parseInt(colors[1]), Integer.parseInt(colors[2])));
|
meta.setColor(Color.fromBGR(Integer.parseInt(colors[2]), Integer.parseInt(colors[1]), Integer.parseInt(colors[0])));
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
event.getPlayer().getInventory().setChestplate(item);
|
event.getPlayer().getInventory().setChestplate(item);
|
||||||
default:
|
default:
|
||||||
@ -87,7 +87,7 @@ public class JailingListener implements Listener {
|
|||||||
ItemStack item = new ItemStack(Material.valueOf(legs[0]));
|
ItemStack item = new ItemStack(Material.valueOf(legs[0]));
|
||||||
LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
|
LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
|
||||||
String[] colors = legs[1].split(",");
|
String[] colors = legs[1].split(",");
|
||||||
meta.setColor(Color.fromBGR(Integer.parseInt(colors[0]), Integer.parseInt(colors[1]), Integer.parseInt(colors[2])));
|
meta.setColor(Color.fromBGR(Integer.parseInt(colors[2]), Integer.parseInt(colors[1]), Integer.parseInt(colors[0])));
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
event.getPlayer().getInventory().setLeggings(item);
|
event.getPlayer().getInventory().setLeggings(item);
|
||||||
default:
|
default:
|
||||||
@ -103,7 +103,7 @@ public class JailingListener implements Listener {
|
|||||||
ItemStack item = new ItemStack(Material.valueOf(boots[0]));
|
ItemStack item = new ItemStack(Material.valueOf(boots[0]));
|
||||||
LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
|
LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
|
||||||
String[] colors = boots[1].split(",");
|
String[] colors = boots[1].split(",");
|
||||||
meta.setColor(Color.fromBGR(Integer.parseInt(colors[0]), Integer.parseInt(colors[1]), Integer.parseInt(colors[2])));
|
meta.setColor(Color.fromBGR(Integer.parseInt(colors[2]), Integer.parseInt(colors[1]), Integer.parseInt(colors[0])));
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
event.getPlayer().getInventory().setBoots(item);
|
event.getPlayer().getInventory().setBoots(item);
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user