mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +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{
|
public static function isCreativeItem(Item $item) : bool{
|
||||||
foreach(Item::$creative as $i => $d){
|
return Item::getCreativeItemIndex($item) !== -1;
|
||||||
if($item->equals($d, !$item->isTool())){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user