CreativeInventory
Methods
add()
php
public function add(\pocketmine\item\Item $item, \pocketmine\inventory\CreativeCategory $category = \pocketmine\inventory\CreativeCategory::ITEMS, ?\pocketmine\inventory\CreativeGroup $group = null) : voidAdds an item to the creative menu. Note: Players who are already online when this is called will not see this change.
clear()
php
public function clear() : voidRemoves all previously added items from the creative menu. Note: Players who are already online when this is called will not see this change.
contains()
php
public function contains(\pocketmine\item\Item $item) : boolcreateVanilla() 5.46.0
php
public static function createVanilla(bool $educationItems) : selfCreates the vanilla creative inventory. Education Edition content (see EducationCreativeFilter) is only included if $educationItems is true, like a vanilla world with the "Education Edition" option.
Use with CreativeInventory::setInstance() before players join.
getAll()
php
public function getAll() : arraygetAllEntries()
php
public function getAllEntries() : arraygetContentChangedCallbacks()
php
public function getContentChangedCallbacks() : \pocketmine\utils\ObjectSetgetEntry()
php
public function getEntry(int $index) : ?\pocketmine\inventory\CreativeInventoryEntrygetItem()
php
public function getItem(int $index) : ?\pocketmine\item\ItemgetItemIndex()
php
public function getItemIndex(\pocketmine\item\Item $item) : intremove()
php
public function remove(\pocketmine\item\Item $item) : voidRemoves an item from the creative menu. Note: Players who are already online when this is called will not see this change.
