Skip to content

ItemSpawnEvent ​

class · pocketmine\event\entity\ItemSpawnEvent · source

Extends EntityEvent

Called when an item is spawned or loaded.

Some possible reasons include:

  • item is loaded from disk
  • player dropping an item
  • block drops
  • loot of a player or entity

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\object\ItemEntity $item)

getEntity() ​

php
public function getEntity()

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.