Commits
Doc authored and md_5 committed 1e87776acbb
109 109 | getHandle().setPotionType(CraftPotionUtil.fromBukkit(data)); |
110 110 | } |
111 111 | |
112 112 | |
113 113 | public PotionData getBasePotionData() { |
114 114 | return CraftPotionUtil.toBukkit(getHandle().getPotionType()); |
115 115 | } |
116 116 | |
117 117 | |
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 | |
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 | } |