mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Remove some redundant code for checking existence of creative items
getCreativeItemIndex() does basically the same thing anyway
This commit is contained in:
parent
e8453b7872
commit
69e29236aa
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user