public __construct ( $id, $meta, integer $count = 1, string $name = "Unknown" ) | ||
$count | integer | |
$name | string |
use pocketmine\item\Item; $item = new Item(364, 0, 1, "Clock");In this example, we are creating a new Item object with an ID of 364, a meta value of 0, a count of 1, and a name of "Clock". This will create a Clock item that can be used in the game. The package library for the Item class is "pocketmine\item". This is the library that contains all the classes related to game items in PocketMine.
public __construct ( $id, $meta, integer $count = 1, string $name = "Unknown" ) | ||
$count | integer | |
$name | string |