mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +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; }
|
||||
|
||||
/**
|
||||
* @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{
|
||||
return $this->renamedIds[mb_strtolower($id, 'US-ASCII')] ?? null;
|
||||
}
|
||||
|
@ -57,6 +57,12 @@ final class ItemIdMetaUpgrader{
|
||||
ksort($this->idMetaUpgradeSchemas, SORT_NUMERIC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ItemIdMetaUpgradeSchema[]
|
||||
* @phpstan-return array<int, ItemIdMetaUpgradeSchema>
|
||||
*/
|
||||
public function getSchemas() : array{ return $this->idMetaUpgradeSchemas; }
|
||||
|
||||
/**
|
||||
* @phpstan-return array{string, int}
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user