mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +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:
parent
5f5f71cfbe
commit
3b3abab3ad
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user