mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
Removed type-hint silently breaking use of CompoundTags in Item::get()
This commit is contained in:
parent
f204422432
commit
fc5fa01442
@ -291,7 +291,17 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get(int $id, int $meta = 0, int $count = 1, string $tags = "") : Item{
|
/**
|
||||||
|
* Returns an instance of the Item with the specified id, meta, count and NBT.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @param int $meta
|
||||||
|
* @param int $count
|
||||||
|
* @param CompoundTag|string $tags
|
||||||
|
*
|
||||||
|
* @return Item
|
||||||
|
*/
|
||||||
|
public static function get(int $id, int $meta = 0, int $count = 1, $tags = "") : Item{
|
||||||
try{
|
try{
|
||||||
$class = self::$list[$id];
|
$class = self::$list[$id];
|
||||||
if($class === null){
|
if($class === null){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user