Many many changes related to inventory transactions, fixed item dropping, fixed creative menu

This commit is contained in:
Dylan K. Taylor
2017-08-11 19:57:30 +01:00
parent c1ff7bbef4
commit 8958b3c51c
14 changed files with 497 additions and 282 deletions

View File

@ -25,7 +25,7 @@ namespace pocketmine\event\inventory;
use pocketmine\event\Cancellable;
use pocketmine\event\Event;
use pocketmine\inventory\TransactionGroup;
use pocketmine\inventory\transaction\InventoryTransaction;
/**
* Called when there is a transaction between two Inventory objects.
@ -34,21 +34,21 @@ use pocketmine\inventory\TransactionGroup;
class InventoryTransactionEvent extends Event implements Cancellable{
public static $handlerList = null;
/** @var TransactionGroup */
private $ts;
/** @var InventoryTransaction */
private $transaction;
/**
* @param TransactionGroup $ts
* @param InventoryTransaction $transaction
*/
public function __construct(TransactionGroup $ts){
$this->ts = $ts;
public function __construct(InventoryTransaction $transaction){
$this->transaction = $transaction;
}
/**
* @return TransactionGroup
* @return InventoryTransaction
*/
public function getTransaction() : TransactionGroup{
return $this->ts;
public function getTransaction() : InventoryTransaction{
return $this->transaction;
}
}