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
$creative
private
array<string|int, Item>
$creative
= []
$instance
private
static self|null
$instance
= null
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 —contains()
public
contains(Item $item) : bool
Parameters
- $item : Item
Return values
bool —getAll()
public
getAll() : array<string|int, Item>
Return values
array<string|int, Item> —getInstance()
public
static getInstance() : self
Return values
self —getItem()
public
getItem(int $index) : Item|null
Parameters
- $index : int
Return values
Item|null —getItemIndex()
public
getItemIndex(Item $item) : int
Parameters
- $item : Item
Return values
int —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 —reset()
public
static reset() : void
Return values
void —setInstance()
public
static setInstance(self $instance) : void
Parameters
- $instance : self
Return values
void —__construct()
private
__construct() : mixed
Return values
mixed —make()
private
static make() : self