mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Clean up SlotChangeAction inventory handling
This commit is contained in:
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\inventory\transaction\action;
|
||||
|
||||
use pocketmine\inventory\transaction\InventoryTransaction;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\Player;
|
||||
|
||||
@ -74,6 +75,15 @@ abstract class InventoryAction{
|
||||
*/
|
||||
abstract public function isValid(Player $source) : bool;
|
||||
|
||||
/**
|
||||
* Called when the action is added to the specified InventoryTransaction.
|
||||
*
|
||||
* @param InventoryTransaction $transaction
|
||||
*/
|
||||
public function onAddToTransaction(InventoryTransaction $transaction) : void{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by inventory transactions before any actions are processed. If this returns false, the transaction will
|
||||
* be cancelled.
|
||||
|
Reference in New Issue
Block a user