mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +00:00
DyeColorIdMap: fixed uninitialized offset error on invalid dye colours
This commit is contained in:
parent
5779622235
commit
08b9495bce
@ -74,7 +74,7 @@ final class DyeColorIdMap{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function fromId(int $id) : ?DyeColor{
|
public function fromId(int $id) : ?DyeColor{
|
||||||
return $this->idToEnum[$id];
|
return $this->idToEnum[$id] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fromInvertedId(int $id) : ?DyeColor{
|
public function fromInvertedId(int $id) : ?DyeColor{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user