mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
CraftingTransaction: make CraftingManager injectable
this becomes a bit easier to unit-test.
This commit is contained in:
@ -236,7 +236,7 @@ class InGamePacketHandler extends PacketHandler{
|
||||
//trying to execute it
|
||||
|
||||
if($this->craftingTransaction === null){
|
||||
$this->craftingTransaction = new CraftingTransaction($this->player, $actions);
|
||||
$this->craftingTransaction = new CraftingTransaction($this->player, $this->player->getServer()->getCraftingManager(), $actions);
|
||||
}else{
|
||||
foreach($actions as $action){
|
||||
$this->craftingTransaction->addAction($action);
|
||||
|
Reference in New Issue
Block a user