PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\inventory\SimpleTransactionGroup Class Reference
+ Inheritance diagram for pocketmine\inventory\SimpleTransactionGroup:
+ Collaboration diagram for pocketmine\inventory\SimpleTransactionGroup:

Public Member Functions

 __construct (Player $source=null)
 
 getSource ()
 
 getCreationTime ()
 
 getInventories ()
 
 getTransactions ()
 
 addTransaction (Transaction $transaction)
 
 canExecute ()
 
 execute ()
 
 hasExecuted ()
 

Protected Member Functions

 matchItems (array &$needItems, array &$haveItems)
 

Protected Attributes

 $hasExecuted = false
 
 $source = null
 
 $inventories = []
 
 $transactions = []
 

Detailed Description

This TransactionGroup only allows doing Transaction between one / two inventories

Definition at line 32 of file SimpleTransactionGroup.php.

Constructor & Destructor Documentation

pocketmine\inventory\SimpleTransactionGroup::__construct ( Player  $source = null)
Parameters
Player$source

Definition at line 47 of file SimpleTransactionGroup.php.

Member Function Documentation

pocketmine\inventory\SimpleTransactionGroup::addTransaction ( Transaction  $transaction)
Parameters
Transaction$transaction

Implements pocketmine\inventory\TransactionGroup.

Definition at line 71 of file SimpleTransactionGroup.php.

References pocketmine\inventory\Transaction\getCreationTime(), pocketmine\inventory\Transaction\getInventory(), and pocketmine\inventory\Transaction\getSlot().

+ Here is the call graph for this function:

pocketmine\inventory\SimpleTransactionGroup::canExecute ( )
Returns
bool

Implements pocketmine\inventory\TransactionGroup.

Definition at line 129 of file SimpleTransactionGroup.php.

References pocketmine\inventory\SimpleTransactionGroup\matchItems().

Referenced by pocketmine\inventory\SimpleTransactionGroup\execute().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pocketmine\inventory\SimpleTransactionGroup::execute ( )
Returns
bool

Implements pocketmine\inventory\TransactionGroup.

Definition at line 136 of file SimpleTransactionGroup.php.

References pocketmine\inventory\SimpleTransactionGroup\canExecute(), pocketmine\Server\getInstance(), pocketmine\inventory\SimpleTransactionGroup\getSource(), and pocketmine\inventory\SimpleTransactionGroup\hasExecuted().

+ Here is the call graph for this function:

pocketmine\inventory\SimpleTransactionGroup::getCreationTime ( )
Returns
float

Implements pocketmine\inventory\TransactionGroup.

Definition at line 59 of file SimpleTransactionGroup.php.

pocketmine\inventory\SimpleTransactionGroup::getInventories ( )
Returns
Inventory[]

Implements pocketmine\inventory\TransactionGroup.

Definition at line 63 of file SimpleTransactionGroup.php.

pocketmine\inventory\SimpleTransactionGroup::getSource ( )
Returns
Player

Definition at line 55 of file SimpleTransactionGroup.php.

Referenced by pocketmine\inventory\CraftingTransactionGroup\execute(), and pocketmine\inventory\SimpleTransactionGroup\execute().

+ Here is the caller graph for this function:

pocketmine\inventory\SimpleTransactionGroup::getTransactions ( )
Returns
Transaction[]

Implements pocketmine\inventory\TransactionGroup.

Definition at line 67 of file SimpleTransactionGroup.php.

pocketmine\inventory\SimpleTransactionGroup::hasExecuted ( )
Returns
bool

Implements pocketmine\inventory\TransactionGroup.

Definition at line 162 of file SimpleTransactionGroup.php.

Referenced by pocketmine\inventory\CraftingTransactionGroup\execute(), and pocketmine\inventory\SimpleTransactionGroup\execute().

+ Here is the caller graph for this function:

pocketmine\inventory\SimpleTransactionGroup::matchItems ( array &  $needItems,
array &  $haveItems 
)
protected
Parameters
Item[]$needItems
Item[]$haveItems
Returns
bool

Definition at line 94 of file SimpleTransactionGroup.php.

Referenced by pocketmine\inventory\CraftingTransactionGroup\addTransaction(), and pocketmine\inventory\SimpleTransactionGroup\canExecute().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: