Documentation

CreativeInventory
in package
Uses SingletonTrait

Table of Contents

$creative  : array<string|int, Item>
$instance  : self|null
add()  : void
Adds an item to the creative menu.
clear()  : void
Removes all previously added items from the creative menu.
contains()  : bool
getAll()  : array<string|int, Item>
getInstance()  : self
getItem()  : Item|null
getItemIndex()  : int
remove()  : void
Removes an item from the creative menu.
reset()  : void
setInstance()  : void
__construct()  : mixed
make()  : self

Properties

Methods

add()

Adds an item to the creative menu.

public add(Item $item) : void

Note: Players who are already online when this is called will not see this change.

Parameters
$item : Item
Return values
void

clear()

Removes all previously added items from the creative menu.

public clear() : void

Note: Players who are already online when this is called will not see this change.

Return values
void

getInstance()

public static getInstance() : self
Return values
self

remove()

Removes an item from the creative menu.

public remove(Item $item) : void

Note: Players who are already online when this is called will not see this change.

Parameters
$item : Item
Return values
void

setInstance()

public static setInstance(self $instance) : void
Parameters
$instance : self
Return values
void

Search results