PocketMine-MP 5.15.1 git-be6754494fdbbb9dd57c058ba0e33a4a78c4581f
|
Public Member Functions | |
__construct (Item $targetItem) | |
execute (Player $source) | |
getSourceItem () | |
getTargetItem () | |
onAddToTransaction (InventoryTransaction $transaction) | |
onPreExecute (Player $source) | |
validate (Player $source) | |
Represents an action involving dropping an item into the world.
Definition at line 35 of file DropItemAction.php.
pocketmine\inventory\transaction\action\DropItemAction::__construct | ( | Item | $targetItem | ) |
Definition at line 37 of file DropItemAction.php.
pocketmine\inventory\transaction\action\DropItemAction::execute | ( | Player | $source | ) |
Drops the target item in front of the player.
Reimplemented from pocketmine\inventory\transaction\action\InventoryAction.
Definition at line 66 of file DropItemAction.php.
|
inherited |
Returns the item that was present before the action took place.
Definition at line 43 of file InventoryAction.php.
|
inherited |
Returns the item that the action attempted to replace the source item with.
Definition at line 50 of file InventoryAction.php.
|
inherited |
Called when the action is added to the specified InventoryTransaction.
Reimplemented in pocketmine\inventory\transaction\action\SlotChangeAction.
Definition at line 64 of file InventoryAction.php.
pocketmine\inventory\transaction\action\DropItemAction::onPreExecute | ( | Player | $source | ) |
Called by inventory transactions before any actions are processed. If this returns false, the transaction will be cancelled.
Reimplemented from pocketmine\inventory\transaction\action\InventoryAction.
Definition at line 50 of file DropItemAction.php.
pocketmine\inventory\transaction\action\DropItemAction::validate | ( | Player | $source | ) |
Returns whether this action is currently valid. This should perform any necessary sanity checks.
TransactionValidationException |
Reimplemented from pocketmine\inventory\transaction\action\InventoryAction.
Definition at line 41 of file DropItemAction.php.