public static function getDyeColor($id) { if (isset(self::$dyeColors[$id])) { return clone self::$dyeColors[$id]; } return Color::getRGB(0, 0, 0); }
public function getCustomColor() { if ($this->isCustomColor()) { $color = $this->namedtag["CustomColor"]; $green = $color >> 8 & 0xff; $red = $color >> 16 & 0xff; $blue = $color & 0xff; return Color::getRGB($red, $green, $blue); } return null; }