mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
Fix W10 throws away held item on inventory close
This issue will however still crop up if there are actual items in the crafting grid instead of air.
This commit is contained in:
@ -2504,6 +2504,12 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
|
||||
break;
|
||||
}
|
||||
|
||||
if($packet->item->getId() === Item::AIR){
|
||||
// Windows 10 Edition drops the contents of the crafting grid on container close - including air.
|
||||
break;
|
||||
}
|
||||
|
||||
$item = $this->inventory->getItemInHand();
|
||||
$ev = new PlayerDropItemEvent($this, $item);
|
||||
$this->server->getPluginManager()->callEvent($ev);
|
||||
|
Reference in New Issue
Block a user