|
PocketMine-MP 5.42.1 git-d77520d210fcb967a02bc11817ad625393c8ebc6
|
Inheritance diagram for pocketmine\inventory\transaction\action\DestroyItemAction:
Collaboration diagram for pocketmine\inventory\transaction\action\DestroyItemAction:Public Member Functions | |
| __construct (Item $targetItem) | |
| execute (Player $source) | |
| getSourceItem () | |
| getTargetItem () | |
| onAddToTransaction (InventoryTransaction $transaction) | |
| onPreExecute (Player $source) | |
| validate (Player $source) | |
This action type shows up when a creative player puts an item into the creative inventory menu to destroy it. The output is the item destroyed. You can think of this action type like setting an item into /dev/null
Definition at line 35 of file DestroyItemAction.php.
| pocketmine\inventory\transaction\action\DestroyItemAction::__construct | ( | Item | $targetItem | ) |
Definition at line 37 of file DestroyItemAction.php.
| pocketmine\inventory\transaction\action\DestroyItemAction::execute | ( | Player | $source | ) |
Performs actions needed to complete the inventory-action server-side. This will only be called if the transaction which it is part of is considered valid.
Reimplemented from pocketmine\inventory\transaction\action\InventoryAction.
Definition at line 47 of file DestroyItemAction.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.
|
inherited |
Called by inventory transactions before any actions are processed. If this returns false, the transaction will be cancelled.
Reimplemented in pocketmine\inventory\transaction\action\DropItemAction.
Definition at line 73 of file InventoryAction.php.
| pocketmine\inventory\transaction\action\DestroyItemAction::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 DestroyItemAction.php.