|
PocketMine-MP 5.42.1 git-d77520d210fcb967a02bc11817ad625393c8ebc6
|
Inheritance diagram for pocketmine\inventory\transaction\action\DropItemAction:
Collaboration diagram for pocketmine\inventory\transaction\action\DropItemAction: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.
Definition at line 65 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.