mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
ItemIdMetaUpgrader: added some auxiliary methods
This commit is contained in:
parent
8e6c1762d7
commit
6f0eb019d2
@ -41,6 +41,18 @@ final class ItemIdMetaUpgradeSchema{
|
|||||||
|
|
||||||
public function getSchemaId() : int{ return $this->schemaId; }
|
public function getSchemaId() : int{ return $this->schemaId; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string[]
|
||||||
|
* @phpstan-return array<string, string>
|
||||||
|
*/
|
||||||
|
public function getRenamedIds() : array{ return $this->renamedIds; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string[][]
|
||||||
|
* @phpstan-return array<string, array<int, string>>
|
||||||
|
*/
|
||||||
|
public function getRemappedMetas() : array{ return $this->remappedMetas; }
|
||||||
|
|
||||||
public function renameId(string $id) : ?string{
|
public function renameId(string $id) : ?string{
|
||||||
return $this->renamedIds[mb_strtolower($id, 'US-ASCII')] ?? null;
|
return $this->renamedIds[mb_strtolower($id, 'US-ASCII')] ?? null;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,12 @@ final class ItemIdMetaUpgrader{
|
|||||||
ksort($this->idMetaUpgradeSchemas, SORT_NUMERIC);
|
ksort($this->idMetaUpgradeSchemas, SORT_NUMERIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ItemIdMetaUpgradeSchema[]
|
||||||
|
* @phpstan-return array<int, ItemIdMetaUpgradeSchema>
|
||||||
|
*/
|
||||||
|
public function getSchemas() : array{ return $this->idMetaUpgradeSchemas; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-return array{string, int}
|
* @phpstan-return array{string, int}
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user