Remove some redundant code for checking existence of creative items

getCreativeItemIndex() does basically the same thing anyway
This commit is contained in:
Dylan K. Taylor 2017-10-08 12:50:53 +01:00
parent e8453b7872
commit 69e29236aa

View File

@ -144,13 +144,7 @@ class Item implements ItemIds, \JsonSerializable{
}
public static function isCreativeItem(Item $item) : bool{
foreach(Item::$creative as $i => $d){
if($item->equals($d, !$item->isTool())){
return true;
}
}
return false;
return Item::getCreativeItemIndex($item) !== -1;
}
/**