Migrate all but two remaining legacy enums to native PHP 8.1 enums

This commit is contained in:
Dylan K. Taylor
2023-09-07 19:32:45 +01:00
parent ae564e445d
commit 94d98fb5c4
57 changed files with 1027 additions and 1086 deletions

View File

@ -172,13 +172,13 @@ abstract class BaseSign extends Transparent{
}
$dyeColor = $item instanceof Dye ? $item->getColor() : match($item->getTypeId()){
ItemTypeIds::BONE_MEAL => DyeColor::WHITE(),
ItemTypeIds::LAPIS_LAZULI => DyeColor::BLUE(),
ItemTypeIds::COCOA_BEANS => DyeColor::BROWN(),
ItemTypeIds::BONE_MEAL => DyeColor::WHITE,
ItemTypeIds::LAPIS_LAZULI => DyeColor::BLUE,
ItemTypeIds::COCOA_BEANS => DyeColor::BROWN,
default => null
};
if($dyeColor !== null){
$color = $dyeColor->equals(DyeColor::BLACK()) ? new Color(0, 0, 0) : $dyeColor->getRgbValue();
$color = $dyeColor === DyeColor::BLACK ? new Color(0, 0, 0) : $dyeColor->getRgbValue();
if(
$color->toARGB() !== $this->text->getBaseColor()->toARGB() &&
$this->doSignChange(new SignText($this->text->getLines(), $color, $this->text->isGlowing()), $player, $item)