Skip to content

DropItemAction ​

class · pocketmine\inventory\transaction\action\DropItemAction · source

Extends InventoryAction

Represents an action involving dropping an item into the world.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\item\Item $targetItem)

execute() ​

php
public function execute(\pocketmine\player\Player $source) : void

Drops the target item in front of the player.

onPreExecute() ​

php
public function onPreExecute(\pocketmine\player\Player $source) : bool

validate() ​

php
public function validate(\pocketmine\player\Player $source) : void

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