|
PocketMine-MP 5.42.1 git-d77520d210fcb967a02bc11817ad625393c8ebc6
|
Inheritance diagram for pocketmine\inventory\transaction\action\CreateItemAction:
Collaboration diagram for pocketmine\inventory\transaction\action\CreateItemAction:Public Member Functions | |
| __construct (Item $sourceItem) | |
| execute (Player $source) | |
| getSourceItem () | |
| getTargetItem () | |
| onAddToTransaction (InventoryTransaction $transaction) | |
| onPreExecute (Player $source) | |
| validate (Player $source) | |
This action is used by creative players to balance transactions involving the creative inventory menu. The source item is the item being created ("taken" from the creative menu).
Definition at line 35 of file CreateItemAction.php.
| pocketmine\inventory\transaction\action\CreateItemAction::__construct | ( | Item | $sourceItem | ) |
Definition at line 37 of file CreateItemAction.php.
| pocketmine\inventory\transaction\action\CreateItemAction::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 50 of file CreateItemAction.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\CreateItemAction::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 CreateItemAction.php.