mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Increased transaction timeout, not needed anymore due to packet ordering
This commit is contained in:
parent
2f6007342c
commit
a677bcb331
@ -2182,7 +2182,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($this->currentTransaction === null or $this->currentTransaction->getCreationTime() < (microtime(true) - 0.5)){
|
if($this->currentTransaction === null or $this->currentTransaction->getCreationTime() < (microtime(true) - 8)){
|
||||||
if($this->currentTransaction instanceof SimpleTransactionGroup){
|
if($this->currentTransaction instanceof SimpleTransactionGroup){
|
||||||
foreach($this->currentTransaction->getInventories() as $inventory){
|
foreach($this->currentTransaction->getInventories() as $inventory){
|
||||||
if($inventory instanceof PlayerInventory){
|
if($inventory instanceof PlayerInventory){
|
||||||
@ -2197,11 +2197,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
$this->currentTransaction->addTransaction($transaction);
|
$this->currentTransaction->addTransaction($transaction);
|
||||||
|
|
||||||
if($this->currentTransaction->canExecute()){
|
if($this->currentTransaction->canExecute()){
|
||||||
if(!$this->currentTransaction->execute()){
|
if($this->currentTransaction->execute()){
|
||||||
$this->currentTransaction = null;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($this->currentTransaction->getTransactions() as $ts){
|
foreach($this->currentTransaction->getTransactions() as $ts){
|
||||||
$inv = $ts->getInventory();
|
$inv = $ts->getInventory();
|
||||||
if($inv instanceof FurnaceInventory){
|
if($inv instanceof FurnaceInventory){
|
||||||
@ -2214,6 +2210,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->currentTransaction = null;
|
$this->currentTransaction = null;
|
||||||
}elseif($packet->windowid == 0){ //Try crafting
|
}elseif($packet->windowid == 0){ //Try crafting
|
||||||
|
Loading…
x
Reference in New Issue
Block a user