From fc5fa0144245ab42ee6a74a757f9363a9c004c95 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 6 Mar 2017 19:45:49 +0000 Subject: [PATCH] Removed type-hint silently breaking use of CompoundTags in Item::get() --- src/pocketmine/item/Item.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index 4c3f4658d..cdef7b45b 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -291,7 +291,17 @@ class Item implements ItemIds, \JsonSerializable{ 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{ $class = self::$list[$id]; if($class === null){