Commits

Doc authored and md_5 committed 1e87776acbb
SPIGOT-6935: Make Arrow color nullable
No tags

src/main/java/org/bukkit/craftbukkit/entity/CraftTippedArrow.java

Modified
109 109 getHandle().setPotionType(CraftPotionUtil.fromBukkit(data));
110 110 }
111 111
112 112 @Override
113 113 public PotionData getBasePotionData() {
114 114 return CraftPotionUtil.toBukkit(getHandle().getPotionType());
115 115 }
116 116
117 117 @Override
118 118 public void setColor(Color color) {
119 - getHandle().setFixedColor(color.asRGB());
119 + int colorRGB = (color == null) ? -1 : color.asRGB();
120 + getHandle().setFixedColor(colorRGB);
120 121 }
121 122
122 123 @Override
123 124 public Color getColor() {
125 + if (getHandle().getColor() <= -1) {
126 + return null;
127 + }
124 128 return Color.fromRGB(getHandle().getColor());
125 129 }
126 130 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut