PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
__construct (Entity $collector, private Entity $origin, private Item $item, private ?Inventory $inventory) | |
call () | |
getEntity () | |
getEventName () | |
getInventory () | |
getItem () | |
getOrigin () | |
isCancelled () | |
setInventory (?Inventory $inventory) | |
setItem (Item $item) | |
Static Public Member Functions | |
static | hasHandlers () |
Protected Attributes | |
Entity | $entity |
string | $eventName = null |
Called when an entity picks up an item, arrow, etc. @phpstan-extends EntityEvent<Entity>
Definition at line 36 of file EntityItemPickupEvent.php.
pocketmine\event\entity\EntityItemPickupEvent::__construct | ( | Entity | $collector, |
private Entity | $origin, | ||
private Item | $item, | ||
private ?Inventory | $inventory ) |
Definition at line 39 of file EntityItemPickupEvent.php.
|
inherited |
|
inherited |
Reimplemented in pocketmine\event\entity\EntityDeathEvent, pocketmine\event\entity\EntityShootBowEvent, pocketmine\event\entity\ItemDespawnEvent, pocketmine\event\entity\ItemSpawnEvent, pocketmine\event\entity\ProjectileHitEvent, pocketmine\event\entity\ProjectileLaunchEvent, and pocketmine\event\player\PlayerDeathEvent.
Definition at line 43 of file EntityEvent.php.
References pocketmine\event\entity\EntityEvent\$entity.
pocketmine\event\entity\EntityItemPickupEvent::getInventory | ( | ) |
Inventory to which received items will be added.
Definition at line 69 of file EntityItemPickupEvent.php.
pocketmine\event\entity\EntityItemPickupEvent::getItem | ( | ) |
Items to be received
Definition at line 55 of file EntityItemPickupEvent.php.
pocketmine\event\entity\EntityItemPickupEvent::getOrigin | ( | ) |
Definition at line 48 of file EntityItemPickupEvent.php.
|
staticinherited |
|
inherited |
Returns whether this instance of the event is currently cancelled.
If it is cancelled, only downstream handlers that declare @handleCancelled
will be called with this event.
pocketmine\event\entity\EntityItemPickupEvent::setInventory | ( | ?Inventory | $inventory | ) |
Change the inventory to which received items are added.
Definition at line 76 of file EntityItemPickupEvent.php.
pocketmine\event\entity\EntityItemPickupEvent::setItem | ( | Item | $item | ) |
Change the items to receive.
Definition at line 62 of file EntityItemPickupEvent.php.
|
protectedinherited |
@phpstan-var TEntity
Definition at line 37 of file EntityEvent.php.
Referenced by pocketmine\event\entity\EntityDamageByBlockEvent\__construct(), pocketmine\event\entity\EntityDamageByChildEntityEvent\__construct(), pocketmine\event\entity\EntityDamageByEntityEvent\__construct(), pocketmine\event\entity\EntityDamageEvent\__construct(), pocketmine\event\entity\EntityDeathEvent\__construct(), pocketmine\event\entity\EntityExplodeEvent\__construct(), pocketmine\event\player\PlayerDeathEvent\__construct(), pocketmine\event\entity\EntityDeathEvent\getEntity(), pocketmine\event\entity\EntityEvent\getEntity(), pocketmine\event\entity\EntityShootBowEvent\getEntity(), pocketmine\event\entity\ItemDespawnEvent\getEntity(), pocketmine\event\entity\ItemSpawnEvent\getEntity(), pocketmine\event\entity\ProjectileHitEvent\getEntity(), and pocketmine\event\entity\ProjectileLaunchEvent\getEntity().
|
protectedinherited |